【问题标题】:Creating CSV file using Aspen SQLplus使用 Aspen SQLplus 创建 CSV 文件
【发布时间】:2017-09-06 13:04:10
【问题描述】:

我有一个来自 IP21 数据的查询,我使用 Aspen InfoPlus.21 在每天的设定时间运行。我现在想每天使用 python 分析这些数据。如何编辑我的 SQL 查询以编写 csv 文件而不仅仅是查询。

【问题讨论】:

    标签: sqlplus aspen


    【解决方案1】:

    一种简单的方法:

    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';
    

    【讨论】:

      猜你喜欢
      • 2018-03-22
      • 1970-01-01
      • 2016-12-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多