If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > multi table UPDATE

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-01-04, 17:09
Viggy Viggy is offline
Registered User
 
Join Date: Jan 2004
Posts: 18
multi table UPDATE

Basically I have a lot of tables linked to a main table via 2 primary keys. Lets just say that there is one main table:
Customer with primary keys custumer_type and custumer_id,

Also, there are many tables such as:
Customer_Information
Customer_this
Customer_that
Customer_whatever

each with the same two primarykeys, all linked to the original table.

Is there away to write an UPDATE query, that will update any fields in these tables that are NOT primary keys. For instance:

UPDATE customer, customer_info, customer_this
SET customer_this.field1 = something, customer_info.field2= blah, etc.
WHERE customer_id = x AND customer_type = y AND customer_info.customer_id = customer.customer_id, etc....

PLEASE HELP!!!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On