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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Statement Help 1

Status
Not open for further replies.

sila

Technical User
Aug 8, 2003
76
GB
Hi

I need to write a sql statement that does an update as the follwing the following:

tab1.ceq_kit_ref needs to be set to be equal to tab2.kitchen_id where tab2.kit_ref = tab1.ceq_kit_ref

All help greatly appreciated!

Thanks.
 
Code:
UPDATE t1
SET ceq_kit_ref = t2.kitchen_id
FROM t1 JOIN t2 ON t1.ceq_kit_ref = t2.kit_ref

--James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top