I am getting the following error "The multi-part identifier "Export_Shipping.s_num" could not be bound.". My target table is web_shipping and the source is export_web_shipping.
How to fix this specific Update query ?
SET Shipping.s_num= Export_Shipping.s_num
FROM Shipping a, Export_Shipping b
WHERE b.[order_id]= a.order_id
Export_Web_Shipping an alias
b. So use
b and not
Also, I would use a
UPDATE a SET a.site_num = b.site_num FROM Web_Shipping a JOIN Export_Web_Shipping b ON b.[web_order_id]= a.web_order_id