【问题标题】:SQL plus | column adjust in spool fileSQL 加 |假脱机文件中的列调整
【发布时间】:2017-10-09 12:39:07
【问题描述】:

我正在从 SQL 假脱机 .csv 文件以及包含一些数据的文件。

我的sql plus的设置是:

sqlplus -s xxxx/xxxx@xxx <<-eod >> $logdir/xxxx.log
set feedback off
    set pages 5000
    set trims on
    set linesize  500
    set term off heading on

    column SP                                       format a10
    column commercial_code      format a50
    column rateplan             format a50
    column priceplanoffer       format a50
    column payment_type         format a50
    column traffictype          format a50
    column direction            format a50
    column onnet_offnet         format a50
    column clasification        format a50
    column cdr_count            format 9999999999
    column event_count          format 9999999999
    column volume               format 9999999999
    column rated_volume         format 9999999999
    column duration             format 9999999999
    column rated_duration       format 9999999999
    column charged_amount       format 9999999999

输出是这样的(不是 100% 正确): https://ibb.co/furf1G

抱歉链接,imgur 不允许我在这里发布图片。

在任何情况下,希望将 CHARGED_AMOUNT next 列放在 RATED_DURATION 列而不是 SP 下。

我想这一定是带有sqlplus参数的东西,你能帮帮我吗? 我怎样才能做到这一点?

非常感谢!

【问题讨论】:

  • 在你的选择语句中你应该输入CHARGED_AMOUNT next to column RATED_DURATION
  • 从输出看你的linsize太小了,试着加大吧。

标签: oracle sqlplus


【解决方案1】:

我编辑了 set linesize 500 到 900 并重新启动了该过程。经过检查,所需的输出正常。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-09-07
    • 2020-07-02
    • 2012-07-30
    • 2016-12-27
    • 2011-02-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多