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

SQL Update Help Needed 1

Status
Not open for further replies.

brettgab

Programmer
Aug 29, 2001
13
AU
I have two tables, Merged_Stock and I_Products. I_Products has a field 'stock_code'. Merged_Stock has two fields, 'old_stock_code' and 'new_stock_code'. I want to write a query which updates I_Products.stock_code with Merged_Stock.new_stock_code. Records will be matched on I_Products.stock_code = Merged_Stock.old_stock_code
 

Update I_Products
Set stock_code=Merged_Stock.new_stock_code
From I_Products Inner Join Merged_Stock
On I_Products.stock_code = Merged_Stock.old_stock_code Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top