【发布时间】:2017-09-06 13:04:10
【问题描述】:
我有一个来自 IP21 数据的查询,我使用 Aspen InfoPlus.21 在每天的设定时间运行。我现在想每天使用 python 分析这些数据。如何编辑我的 SQL 查询以编写 csv 文件而不仅仅是查询。
【问题讨论】:
我有一个来自 IP21 数据的查询,我使用 Aspen InfoPlus.21 在每天的设定时间运行。我现在想每天使用 python 分析这些数据。如何编辑我的 SQL 查询以编写 csv 文件而不仅仅是查询。
【问题讨论】:
一种简单的方法:
set output = 'C:\test.csv'; --Note this is relative to the IP21 server, not the client machine
for (select * from myTable) do
write column1 || ',' || column2 || ',' || column3;
end
set output = default;
write 'All done';
【讨论】: