熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Oracle >> 正文

spool導出實例

2022-06-13   來源: Oracle 

  spool導出實例

  .    增加帳戶記錄
 spool /home/mocsa/subsid_addmoneycsv
select tsubsidtacctidsum(ttransmoney)
from T_ACCTWATER t
where (trunc(tTRANSTIMEdd) between trunc(to_date(yyyymmdd)dd) and trunc(to_date(yyyymmdd)dd) )
       and tTRANSTYPE = and tREPENISHCHANNEL =
       and tsubsid in( select SubsId
                     from T_ACCTWATER
                     where (trunc(TRANSTIMEdd) between trunc(to_date(yyyymmdd)dd)
                           and trunc(to_date(yyyymmdd)dd) )
                           and TRANSTYPE = and REPENISHCHANNEL =
                     group by SubsId
                    having sum(TRANSMONEY)>)
group by tsubsidtacctid;
spool off;


From:http://tw.wingwit.com/Article/program/Oracle/201311/18475.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.