开发者

SQL Server 2005 simple update statment with join

开发者 https://www.devze.com 2023-01-09 07:27 出处:网络
I have 2 tables, one called dbo.dd and one called dbo.gt. where dbo.gt.v_products_model = dbo.dd.[Vendor Stock Code]

I have 2 tables, one called dbo.dd and one called dbo.gt.

where dbo.gt.v_products_model = dbo.dd.[Vendor Stock Code]

I would like to update the

开发者_运维知识库

field dbo.gt.v_products_price with the dbo.dd.[Dealer Ex]

Sorry, forgot syntax of SQL 2005 and in a jam!


Update g
set g.v_product = d.[Dealer Ex]
From dbo.gt g 
Join dbo.dd d on g.v_products_model = d.[Vendor Stock Code]
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号