TOAD Export Oracle Script To Save Data Programatically
I have a bunch of SELECT statement scripts where I am pulling data for a bunch of different tables. As far as exporting that data and saving it, I have to manually run each query, right click and "Save Data As" select my o开发者_如何转开发ptions, then click save.
Is there any thing I can wrap my SELECT statment programatically in so that when I run it it will automatically export and save the data eliminating the need for me to manually "Save Data As?"
yes, you can. Toad has an automation designer that will allow you to automate and schedule the task. Look under Utilities -- Automation Designer.
Most straightforward way to accomplish what you're trying to do is to use sqlplus
to spool results of your select queries into a csv
file.
See this stackoverflow answer for directions:
How do I spool to a CSV formatted file using SQLPLUS?
精彩评论