|
-
Aug 12th, 2002, 05:56 PM
#1
Thread Starter
Fanatic Member
sql 'UPDATE' statement question
Hey all.
I working with a sql database. I have to Tables that contain data on a customer. I am using a left outer join query to retrieve and view a complete data set on the customer. My question is when Iam modifying customer details in some instances i need to update information in both tables. Is there a syntax for doing this at the same time eg
UPDATE MYTABLE LEFT OUTER JOIN MYOTHERTABLE SET BLAH, BLAH WHERE BLAHBLAH = 'BLEH'
would a statement like that work?
I have tried it and get errors I cant seem to find any documentation on doing joined table updates
any help would be appreciated thanks
-
Aug 12th, 2002, 06:08 PM
#2
PowerPoster
There is no single query that I'm aware of to update 2 tables in one hit. But what you can do, is set up relationships in the tables, and set them to cascade updates. In Access, this is pretty straightforward, I can't speak for any other system though, and it only works for related fields.
Depending on what you need, you may just need 2 queries.
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Aug 12th, 2002, 06:26 PM
#3
Thread Starter
Fanatic Member
ahhhh
I thought that might be the case. Dang it all lol
This means i have to spend a few more hours making all my update procedures recursive to step through the multiple tables 
Iam working with more than 50 linked tables so I was living in hope a bit there.
-
Aug 12th, 2002, 06:35 PM
#4
PowerPoster
Would the cascade option help? What are you trying to achieve - illustrate with some example perhaps?
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|