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

Best way to update multiple records with SQL statement

Status
Not open for further replies.

meldrape

Programmer
May 12, 2001
516
US
Hi there,

I have two tables:
contacts
orders

I need to update the orders table with the contact's shipping info. The linking field is the customer id. I've tried query after query, loop after loop and just can't get it right. Any thoughts would be VERY MUCH appreciated. Thanks.

 
What happens when you update the contact table for that customer ID and the order table for that customer ID? When you add the contact, does the system assign a new customer ID automatically? Then you need to reread the customer ID right after you add the record, then use that customer ID to insert the order.
 
Hi Denoxis,

I actually ended up using query analyzer and doing the update through there. Thanks for trying to help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top