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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.