UPDATE a
SET a.Price=(SELECT MAX(b.PRICE) FROM ITEM AS b WHERE b.Item=a.Item and b.Price is not null )
FROM Item AS a
*credit goes to this post: http://stackoverflow.com/questions/12151107/tsql-update-table-from-itself
My professional notes on programming. Included in my notes are discussions on VB.NET, Microsoft Office, and some C#. I am just starting to learn about C# so as I learn more I will add more.
UPDATE a
SET a.Price=(SELECT MAX(b.PRICE) FROM ITEM AS b WHERE b.Item=a.Item and b.Price is not null )
FROM Item AS a
No comments:
Post a Comment