-
update 2 tables
I have a sql file with 2 update queries
UPDATE a
set a.code='C'
WHERE a.seqno IN (SELECT a.seqno FROM a,b WHERE a.code=' ' AND b.code2='D');
UPDATE b
set b.code2='C'
WHERE b.seqno IN (SELECT b.seqno FROM a,b WHERE a.code=' ' AND b.code2='D');
as you can see, the 1st update results in no rows bewing updated in the 1nd query as a.code is updated to 'C' by the 1st update.
Is there anyway we can run the 1st update and then run the 2nd update with the snapshot of the data before the 1st update?
We have to run both update in a single sql file.
Thanks
Sam
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
|