I have to update a column in one database based on a select query that is between two databases checking for a null. This is what I have:
SET active = '0'
FROM (SELECT db1.dbo.products.sku
LEFT JOIN db2.dbo.item ON db1.dbo.products.sku = db2.dbo.item.itemlookupcode
WHERE db2.dbo.item.itemlookupcode IS NULL)
I am getting an invalid syntax error at ")"
I can't see what is wrong... please help.