zzhtd(华子) 老凶 我实在是个菜鸟 撒都不晓得 你帮我写个你所说的过程过程好不 我宁愿那样下岗 实在着不住了比如这个select b.bureau_no,count(DISTINCT a.ord_no) from ibss.tba_ask_list a,ibss.tsm_site b,ibss.tba_phs_ask c where a.sequ='0' and a.state<>'6' and a.serv_no like '2J%' and a.ord_no=c.ord_no and a.site_no=b.site_no group by b.bureau_no 能加个命令调出前天的增量也好 谢谢了
我觉得有个办法,赫赫~~: select * from table where 你的原来的固定的手工改的日期; 把你上面的部分改为: select * from table where timeField = sysdate - 1;
select b.bureau_no,count(DISTINCT a.ord_no) from ibss.tba_ask_list a,ibss.tsm_site b,ibss.tba_phs_ask c where a.sequ='0' and a.state<>'6' and a.serv_no like '2J%' and a.ord_no=c.ord_no and a.site_no=b.site_no and a.CREATE_date>=to_date('2005-05-31 00:00:00','yyyy-mm-dd hh24:mi:ss') and a.CREATE_date<to_date('2005-06-01 23:59:59','yyyy-mm-dd hh24:mi:ss') group by b.bureau_no修改后select b.bureau_no,count(DISTINCT a.ord_no) from ibss.tba_ask_list a,ibss.tsm_site b,ibss.tba_phs_ask c where a.sequ='0' and a.state<>'6' and a.serv_no like '2J%' and a.ord_no=c.ord_no and a.site_no=b.site_no and a.CREATE_date = sysdate - 1 group by b.bureau_no 可以执行,但返回为空,查询系统时间正确.请各位大哥指点
我维护的是一家国有大企业的数据库.是ORA8I
每天都要提取前一天的业务发展量,因为产品很多所以要涉及到很多表.很多SQL
每天都要改SQL里面的时间,取表都得3.4个小时.工作效率上不去
有哪位高手能帮我,写条SQL 取每天的增量,而不需修改时间.谢谢
在存储过程正确运行正确后,在日志表中插入条记录记录运行完成时间,
这样你每天的工作就是看看这张表,不过小心下岗了:)
我实在是个菜鸟 撒都不晓得 你帮我写个你所说的过程过程好不 我宁愿那样下岗 实在着不住了比如这个select b.bureau_no,count(DISTINCT a.ord_no)
from ibss.tba_ask_list a,ibss.tsm_site b,ibss.tba_phs_ask c
where a.sequ='0'
and a.state<>'6'
and a.serv_no like '2J%'
and a.ord_no=c.ord_no
and a.site_no=b.site_no
group by b.bureau_no 能加个命令调出前天的增量也好 谢谢了
select * from table where 你的原来的固定的手工改的日期;
把你上面的部分改为:
select * from table where timeField = sysdate - 1;
from ibss.tba_ask_list a,ibss.tsm_site b,ibss.tba_phs_ask c
where a.sequ='0'
and a.state<>'6'
and a.serv_no like '2J%'
and a.ord_no=c.ord_no
and a.site_no=b.site_no
and a.CREATE_date>=to_date('2005-05-31 00:00:00','yyyy-mm-dd hh24:mi:ss')
and a.CREATE_date<to_date('2005-06-01 23:59:59','yyyy-mm-dd hh24:mi:ss')
group by b.bureau_no修改后select b.bureau_no,count(DISTINCT a.ord_no)
from ibss.tba_ask_list a,ibss.tsm_site b,ibss.tba_phs_ask c
where a.sequ='0'
and a.state<>'6'
and a.serv_no like '2J%'
and a.ord_no=c.ord_no
and a.site_no=b.site_no
and a.CREATE_date = sysdate - 1
group by b.bureau_no 可以执行,但返回为空,查询系统时间正确.请各位大哥指点