spool导出实例:
1.增加帐户记录:spool /home/mocsa/subsid_addmoney1.csvselect t.subsid,t.acctid,sum(t.transmoney) from T_ACCTWATER twhere (trunc(t.TRANSTIME,‘dd‘) between trunc(to_date(‘20070929‘,‘yyyymmdd‘),‘dd‘) and trunc(to_date(‘20071016‘,‘yyyymmdd‘),‘dd‘) ) and t.TRANSTYPE = 11 and t.REPENISHCHANNEL = ‘307‘and t.subsid in( select SubsId from T_ACCTWATERwhere (trunc(TRANSTIME,‘dd‘) between trunc(to_date(‘20070929‘,‘yyyymmdd‘),‘dd‘) and trunc(to_date(‘20071016‘,‘yyyymmdd‘),‘dd‘) ) and TRANSTYPE = 11 and REPENISHCHANNEL = ‘307‘group by SubsIdhaving sum(TRANSMONEY)10000)group by t.subsid,t.acctid; spool off;
| 广告合作:400-664-0084 全国热线:400-664-0084 Copyright 2010 - 2017 www.my8848.com 珠峰网 粤ICP备15066211号 珠峰网 版权所有 All Rights Reserved
|