Hopefully an easy question: I have two sql tables Items and BillOfMaterials
Items has fields ItemID and ItemCategory
BillOfMaterials has fields ItemID and ComponentItemID
How can I do an UPDATE on BillOfMaterials to change the ComponentItemID where the ItemID has a certain category? e.g.
UPDATE BillOfMaterials
SET ComponentItemID = dbo.GetNewItemID(ComponentItemID)
WHERE ItemCategory = 1 <-- Magic join here to pull in ItemCategory
 
    