spool导出实例


spool导出实例:

1.    增加帐户记录:
 spool /home/mocsa/subsid_addmoney1.csv
select t.subsid,t.acctid,sum(t.transmoney)
from T_ACCTWATER t
where (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_ACCTWATER
                     where (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 SubsId
                    having sum(TRANSMONEY)>10000)
group by t.subsid,t.acctid;
spool off;

本文作者:



相关阅读:
js cookies实现简单统计访问次数
修复Bug大幅升级 Sun发布MySQL5.1版
Windows Server 2008 R2的八大优势
ie6和ie7下链接图片点不中问题讨论
数据访问函数库 for ado.net2.0
自定义链接后端数据库
PHP 调试工具Debug Tools
Linux yum安装过程图文详解
js prototype 格式化数字 By shawl.qiu
Javascript 的addEventListener()及attachEvent()区别分析
php学习笔记之 函数声明(二)
通过Grub启动硬盘上的Linux ISO安装文件
ASP.NET获取远程网页下载到本地文件
DEDE二级域名(多站点)绑定详解
快速导航

Copyright © 2016 phpStudy |