Jump to content

UPDATE one table with data from another


marksie1988

Recommended Posts

Hi,

 

i have a table which will hold products in it but first the products are imported to tempproducts so that i can update the products where there is a change i created the following update command but i keep getting the following error:

 

Msg 4104, Level 16, State 1, Line 4

The multi-part identifier "dbo.tempproduct.manf_part_no" could not be bound.

Msg 4104, Level 16, State 1, Line 5

The multi-part identifier "dbo.tampproduct.supp_id" could not be bound.

 

 

UPDATE dbo.products
SET dbo.products.avail_qty = dbo.tempproduct.avail_qty
FROM dbo.products
WHERE dbo.products.manf_part_no =  dbo.tempproduct.manf_part_no 
AND dbo.products.supp_id = dbo.tampproduct.supp_id

 

i havent been using mssql for long as i mainly use mysql so am not too sure on some things like this.

 

help appreciated

 

Steve

Link to comment
https://forums.phpfreaks.com/topic/177324-update-one-table-with-data-from-another/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.