I have to update a field with a value which is returned by a join of 3 tables.
Example:
select im.itemid ,im.sku as iSku ,gm.SKU as GSKU
You can use the following query:
UPDATE im SET mf_item_number = (some value) FROM item_master im JOIN group_master gm ON im.sku = gm.sku JOIN Manufacturer_Master mm ON gm.ManufacturerID = mm.ManufacturerID WHERE im.mf_item_number like 'STA%' AND gm.manufacturerID = 34 `sql`