select k,count(*) from(
select a.key k,b.* from 表A a,(select * from 表B where to_date(submitTime,'yyyy-mm-dd hh24:mi') between to_date('2003-7-1 23:59','yyyy-mm-dd hh24:mi') and to_date('2005-1-1 23:59','yyyy-mm-dd hh24:mi') ) b where instr(b.msgContent,a.key)>0
) group by k;
没经过调试
select a.key k,b.* from 表A a,(select * from 表B where to_date(submitTime,'yyyy-mm-dd hh24:mi') between to_date('2003-7-1 23:59','yyyy-mm-dd hh24:mi') and to_date('2005-1-1 23:59','yyyy-mm-dd hh24:mi') ) b where instr(b.msgContent,a.key)>0
) group by k;
没经过调试
解决方案 »
- group by
- pl/sql无法连接到本地数据库报"ORA-12541:TNS:无监听程序"错误
- 关于导入数据的问题!!(急~~)
- 在线等待!急!!!!!!!!!!!!!!!!!!!!!
- oracle9i问题
- 请beckhambobo(beckham)进来拿分
- 哪位大侠知道comment on的用法及意义?
- 新手,请多帮忙
- 急!!求助!!oracle11g rac 总是有Fatal NI connect error 12170 怎么解决
- scott用户下建了DDL触发器,无法删除怎么办?
- 装好pl/sql后登陆时 Username,password,database connect as都该如何填呀?在线等待!谢谢!
- 数据提取的问题
(select * from A
where A.key in (select msgconent from B where to_char(submitTime,'yyyy.mm.dd)>'2002.07.01'
and to_char(submitTime,'yyyy.mm.dd')<'2005.01.01');
(select * from A
where A.key in (select msgconent from B where to_char(submitTime,'yyyy.mm.dd)>'2002.07.01'
and to_char(submitTime,'yyyy.mm.dd')<='2005.01.01');
(select b.* from a,b
where to_date(b.submitTime,'yyyy-mm-dd hh24:mi') between to_date('2002-7-1 23:59','yyyy- mm-dd hh24:mi') and to_date('2005-1-1 23:59','yyyy-mm-dd hh24:mi')
and instr(b.msgContent,a.key)>0
)