Is there any slick way to use SQL to write SQL in sqldeveloper? This would involve running the output of a SQL SELECT statement, which, after all, is just sitting there in the output window, ready to execute. Or am I pretty much stuck with writing to the spool file and then executing it?
Perhaps you are using a SQL Developer release prior to 2.1. Using 2.1 or higher, the Script Output tab's toolbar contains an icon to Run Script Output as a Script , which opens a new worksheet and copies the script output into it for execution.
Is there any slick way to use SQL to write SQL in sqldeveloper?
No - the result just holds the results. You can copy and paste from it to a sql window and then execute it but nothing like you describe.
Or am I pretty much stuck with writing to the spool file and then executing it?
Thank you! Very tricky! You have to run the SELECT statement with the Run Script button, not the Execute Statement icon. Then you get the Script Output tab and there is indeed the Run Script Output as a Script button.