Run Script and export delimited from command line

Ron E

Member²
We would like to use the XP Task Scheduler to run a PL/SQL (not necessarily just SQL) script from the command line and export the result to a delimited file automatically, just like you can do with the data grid in a PL/SQL Developer SQL window. We can do some of this Spooling SQL-PLUS with COLSEP set to a tab-char, but that requires manually creating headings, not using PL/SQL commands, etc.

I noticed a post a year or so ago about running the DOC command from a command line. Is something similar available for the SQL window, including the export part? The only command line documentation I can find seems to be for the command window, unless I am missing something.

I haven't tried doing something similar with Query Reporter yet. Would that a better option?

Or is there a new feature request for a built-in PL/SQL Developer scheduling add-in that we could add our vote to?

Thanks,
Ron
 
You cannot automate this with the SQL Window Export function. The Query Reporter may be able to help you out, depending on the format. It can be called from the Windows command-line to connect to a database, run a report, export the results, and quit.
 
Back
Top