October 31st, 2007, 06:21 PM
Executing multiple INSERT statements in TOAD
I want to execute 10 INSERT statements in the TOAD editor. I have tried several batch-execution approaches--none worked--including:
-Pressing F5, aka "execute as script". This simply hangs and does nothing, and I have to cancel the operation after a few minutes of seeing no results.
-Pressing F9, aka "execute statement", on one line with one statement. This only executes that one statement.
-Pressing F9 on one line with multiple statements separated by semicolon ";" this produces an error saying there's an invalid character after the first ";"
-Highlighting all 10 lines and pressing F9 or Shift+F9... produces same error as above.
So, I ask yee, is there a way to execute 10 lines of INSERT statements with the click of ONE botton?
October 31st, 2007, 06:34 PM
Alas, I figured out one way to accomplish the task at hand: wrap the statements in a PL/SQL block. Still would like to know if the editor itself has a way to execute multiple CRUD statements though.
December 17th, 2008, 11:25 PM
can any one please give me a sample code for executing multiple insert statements using toad.
I learnt that we could do by keeping all the insertments into a file and run it.
December 18th, 2008, 03:42 AM
Depends on the database of course. TOAD for Oracle?:
INTO suppliers (supplier_id, supplier_name) VALUES (1000, 'IBM')
INTO suppliers (supplier_id, supplier_name) VALUES (2000, 'Microsoft')
INTO suppliers (supplier_id, supplier_name) VALUES (3000, 'Google')
SELECT * FROM dual;
9 out of 10 PHP problems can be resolved by setting
php -l <filename> will identify 9 out of the remaining 10 problems
Remember, the command line
is your friend