I have to update a field with a value which is returned by a join of 3 tables.
(我必须更新一个值,该值由3个表的联接返回。)
Example:
(例:)
select
im.itemid
,im.sku as iSku
,gm.SKU as GSKU
,mm.ManufacturerId as ManuId
,mm.ManufacturerName
,im.mf_item_number
,mm.ManufacturerID
from
item_master im, group_master gm, Manufacturer_Master mm
where
im.mf_item_number like 'STA%'
and im.sku=gm.sku
and gm.ManufacturerID = mm.ManufacturerID
and gm.manufacturerID=34
I want to update the mf_item_number
field values of table item_master
with some other value which is joined in the above condition.
(我想用其他在上述条件下加入的值更新表item_master
的mf_item_number
字段值。)
How can I do this in MS SQL Server?
(如何在MS SQL Server中执行此操作?)
ask by Shyju translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…