I am getting the following error "The multi-part identifier "Export_Web_Shipping.site_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 Web_Shipping.site_num= Export_Web_Shipping.site_num
FROM Web_Shipping a, Export_Web_Shipping b
WHERE b.[web_order_id]= a.web_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