Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is this possible? Update Sub Query Question 1

Status
Not open for further replies.

baddos

MIS
Dec 3, 2002
2,360
US
I have two tables...

customer
custid int 'Primary Key
custshipper int

items
itemid int 'Primary Key
custid int 'Foreign Key
itemshipper int


I want to update the items table to put each customers shipper into the items table for their items.
 
I belive you're looking for this:

Update Items
set itemshipper = b.custshipper
from Items a inner join customer b
on a.custid=b.custid

Be sure to BACKUP before conducting any updates as a rule of thumb. Found that out the hard way!

-David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top