保证问题依然存在的情况下,语句可以简化成如下:select * from sncn_zd_jg b,tb_evt_dlv a,tb_evt_mail_clct c where c.clct_bureau_org_code =b.zj_code and c.clct_date = to_date('2014-3-10','yyyy-mm-dd') and c.mail_num=a.mail_num and c.clct_bureau_org_code like '23004900%'
下面这个报错: select * from tb_evt_dlv a, sncn_zd_jg b,tb_evt_mail_clct c where a.mail_num=c.mail_num and a.dlv_date = to_date('2014-3-10','yyyy-mm-dd') and a.dlv_sts_code='I' and a.dlv_bureau_org_code =b.zj_code and a.dlv_bureau_org_code like '23007300%' 下面这个正常: select * from tb_evt_dlv a,tb_jg b,tb_evt_mail_clct c where a.mail_num=c.mail_num and a.dlv_date =to_date('2014-3-10','yyyy-mm-dd') and a.dlv_sts_code='I' and a.dlv_bureau_org_code =b.zj_code and a.dlv_bureau_org_code like '23007300%' 差别在于用了两个不同的机构表,两个表结构完全相同,tb_jg的记录3000多条,包含了sncn_zd_jg表中的记录(200多条)
LZ你确定每次报错都是ORA-03113,有没有相应的trace文件产生。
确定每次报错都是ORA-03113,点击确认
似乎问题出在表sncn_zd_jg上,但单独对这个表查询是没有问题的,将这个表改名,重建这个表: create table sncn_zd_jg as select * from tb_jg t where t.zdbz='1' 再次运行原来报错的语句,错误没有了,那么那个表出了什么问题呢?
查询语句是一样的,只是值不同,所耗资源应该差不多吧,把上面的条件改为a.dlv_bureau_org_code = '23007300',也可以查到正确结果。
where c.clct_bureau_org_code =b.zj_code
and c.clct_date = to_date('2014-3-10','yyyy-mm-dd')
and c.mail_num=a.mail_num
and c.clct_bureau_org_code like '23004900%'
select *
from tb_evt_dlv a, sncn_zd_jg b,tb_evt_mail_clct c
where a.mail_num=c.mail_num
and a.dlv_date = to_date('2014-3-10','yyyy-mm-dd')
and a.dlv_sts_code='I'
and a.dlv_bureau_org_code =b.zj_code
and a.dlv_bureau_org_code like '23007300%'
下面这个正常:
select *
from tb_evt_dlv a,tb_jg b,tb_evt_mail_clct c
where a.mail_num=c.mail_num
and a.dlv_date =to_date('2014-3-10','yyyy-mm-dd')
and a.dlv_sts_code='I'
and a.dlv_bureau_org_code =b.zj_code
and a.dlv_bureau_org_code like '23007300%'
差别在于用了两个不同的机构表,两个表结构完全相同,tb_jg的记录3000多条,包含了sncn_zd_jg表中的记录(200多条)
create table sncn_zd_jg as select * from tb_jg t where t.zdbz='1'
再次运行原来报错的语句,错误没有了,那么那个表出了什么问题呢?