Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gdzierzon/80b448e480001284b67f9649953d29a6 to your computer and use it in GitHub Desktop.
Save gdzierzon/80b448e480001284b67f9649953d29a6 to your computer and use it in GitHub Desktop.
-- the following external database with new prices should have ben created before execution of this script
/*
CREATE TABLE tmpProductPrices
(
ProductId int
, Price number(10,2)
)
*/
UPDATE p
SET p.Price = tmp.Price
FROM Products AS p
INNER JOIN tmpProductPrices as tmp
ON p.ProductId = tmp.ProductId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment