Multiple statements in SQL Window

DDB

Member
When I try to run multiple statements in one window it will only run the first. Is their an option I need to turn on?

Here is a small example of my code:
update eim_rebuild_stock_receipts
set emp_no = '80000'||'7188'
where emp_no like '0%7188';

update EWF_LABOR_EXCEPTIONS
set emp_no = '80000'||'7188'
where emp_no like '0%7188';
 
Try selecting both statements, and then press F8. There is an "autoselect" option in tools->preferences->sql_window which you can use to indicate whether it is necessary to select a statement in order to run it. A side effect of this is, that if you use this option and there are 2 statements in your SQL window, only one of the statements will be executed unless you explicitly select both statements.
 
This Feature is indeed very useful for multiple select statements. For multiple update statements I prefer the Command Window (Tab Editor) or a little Script in a Test Window.

In this context: If you have multiple statements in the SQL Window and then press F5 (Explain Plan Window), all statements are taken into the Explain Plan Window. Then comes an ORA-00911 error. Possilbliy the "autoselect" option will not work in the Explain Plan Window.
 
Back
Top