Forums » General Discussion

Thread: Is it possible to run multiple updates against different tables in one go?

This question is not answered. Helpful answers available: 2. Answered answers available: 1.


Permlink Replies: 2 - Pages: 1 - Last Post: Sep 12, 2011 3:10 PM by: Mauritz Threads: [ Previous | Next ]
Markyboy

Posts: 1
Registered: 9/2/11
Is it possible to run multiple updates against different tables in one go?
Posted: Sep 2, 2011 11:38 PM
 
  Click to reply to this thread Reply

Hi there

Totally new to TOAD. As part of a system testing project I'm helping on , I have to keep making updates to several tables to prefix various field values with a string. Each time teh system test cycle advances , I have to use a new string, (so MH1, MH2, MH3, etc ..)

Currently I'm copying and pasting the various updates into the toad user interface, and running one by one. Is there a way of having all of the updates being able to run at once ? (I read "script" somewhere but couldn't find any doc. on it)

Note - I'm happy keeping my set of updates on a text doc on my laptop, and making a change to MH1, etc inmy editor, but just not sure how to run them all in one go

Thanks - Mark
  update table1 SET ref1= concat('MH1',Ref1)

update table2 SET kref= concat('MH1',kref1)
etc...

Message was edited by: Markyboy


Ola Arwidsson

Posts: 1
Registered: 9/6/11
Re: Is it possible to run multiple updates against different tables in one go?
Posted: Sep 6, 2011 3:33 AM   in response to: Markyboy
 
  Click to reply to this thread Reply

Markboy, if you keep all your updates in an editor window, and press F5 for execute all commands in that window will be executed as a 'script'. You can also save the script and probaly also search and replace your text direcly in toad editor.

Ola


Mauritz

Posts: 313
Registered: 8/23/07
Re: Is it possible to run multiple updates against different tables in one go?
Posted: Sep 12, 2011 3:10 PM   in response to: Ola Arwidsson
 
  Click to reply to this thread Reply

Can just add that perhaps you would want to check out Toad script:

http://toad.henrik.org/2009/07/flow-control-for-your-scripts.html




Legend
Guru: 2001 + pts
Expert: 751 - 2000 pts
Enthusiast: 31 - 750 pts
Novice: 0 - 30 pts
Moderators
Helpful answer (5 pts)
Answered (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums