TOAD 导出 Oracle 脚本以编程方式保存数据

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4378706/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 22:08:26  来源:igfitidea点击:

TOAD Export Oracle Script To Save Data Programatically

oracleexporttoad

提问by aherrick

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 options, then click save.

我有一堆 SELECT 语句脚本,我正在为一堆不同的表提取数据。至于导出该数据并保存它,我必须手动运行每个查询,右键单击并“将数据另存为”选择我的选项,然后单击保存。

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?"

有什么我可以以编程方式包装我的 SELECT 语句的东西,这样当我运行它时,它会自动导出并保存数据,而无需我手动“将数据另存为”?

alt text

替代文字

回答by Medezark

yes, you can. Toad has an automation designer that will allow you to automate and schedule the task. Look under Utilities -- Automation Designer.

是的你可以。Toad 有一个自动化设计器,可让您自动化和安排任务。在 Utilities -- Automation Designer 下查看。

回答by vls

Most straightforward way to accomplish what you're trying to do is to use sqlplusto spool results of your select queries into a csvfile.

完成您要执行的操作的最直接方法是使用sqlplus将选择查询的结果假脱机到一个csv文件中。

See this stackoverflow answer for directions:

有关说明,请参阅此 stackoverflow 答案:

How do I spool to a CSV formatted file using SQLPLUS?

如何使用 SQLPLUS 假脱机到 CSV 格式的文件?