ORA-03113错误解决实例

WBOY
发布: 2016-06-07 17:30:01
原创
2797 人浏览过

执行出现ORA-03113错误,网络正常,执行其他SQL也正常.

原始SQL:
 
执行出现ORA-03113错误,网络正常,执行其他SQL也正常.

13:04:26 哭@哭> select operatime,billtypename,billid,shopcode,shopname,goodscode,goodsn
ame,' ' 期初数量,sum(irealnumber) irealnumber,DECODE(sum(irealnumber),0,0,round(sum(imoney)/sum( irea
lnumber),2)) iprice,sum(imoney) imoney,sum(orealnumber) orealnumber,DECODE(sum(orealnumber),0,0,roun
d(sum(omoney)/sum(orealnumber) ,2)) oprice,sum(omoney) omoney,' ' 结存数量 from( select to_char(x.ope
ratetime, 'YYYY-MM-DD') operatime,x.billtype,
13:04: 28  2        fun_getname('BILLTYPEALL',x.billtype) billtypename,
13:04:28  3        x.billid,x.remark,x.originbillid,
13:04:28  4        fun_getname('OPERATIONTYPE', x.otherinouttype) otherinouttypename,
13:04:28  5        x.shopcode,
13:04:28  6        f_getOrganiseName(x.shopcode) 商店名称,
13:04:28  7          x.storecode,
13:04:28  8        f_getStoreName(x.storecode) 商店名称,
13:04:28  9          FUN_GETTOUNIT(x.billtype,x.billid) 单位名称,
13:04:28  10        x.goodscode,
13:04:28  11        X.商品名称,
13:04:28  12        x.ShortCode,x.brandcode,x.model,
13:04:28  13        x.irealnumber,
13:04:28  14        abs(DECODE(x.irealnumber,0,0,round(x.imoney/x.irealnumber,4))) iprice,
13:04:28  15        x.imoney,x.orealnumber ,
13:04:28  16        abs(DECODE(x.orealnumber,0,0,round(x.omoney/x.orealnumber,4))) oprice,
13:04:28  17        x.omoney
13:04:28  18  from (
13:04:28  19  选择 a.operatetime,
13:04:28  20                a.billtype,
13:04:28  21                a.billi d ,fun_getbillremark(a.billid) 备注,fun_getbilloriginbillid(a.b
illid) originbillid,
13:04:28  22                a.otherinouttype,
13:04:28  23                a .商店代码,
13: 04:28  24                a.storecode,
13:04:28  25                a.goodscode,
13:04:28  26                c.shortcode,c.brandcode,c.model,
1 3:04:28 27 c.goodsname,
13:04:28 28 sum(decode(b.Ruleid,1,a.realnumber,2,-a.realnumber,0))irealnumber,13:04:28  30                        round(a.realnumber * a.price,2),
13:04:28  31                      2,
13:04:28 32                        round(-1 * a.realnumber *a.price,2),
13:04:28  33                    0)) imoney,
13:04:28  34                sum(解码(b.ruleid,2, a.realnumber,1,-a.realnumber,0)) orealnumber,
13:04:28  35                sum(decode(b.ruleid,2,
13:04:28  36                        round(a.realnumber * a.price,2),
13:04:28  37                      1,
13:04:28  38                        round(-1 * a.realnumber * a.price,2),
13:04: 28  39                    0)) omoney
13:04:28  40            来自 TAB_A a、TAB_B b、TAB_C c
13:04:28  41            其中 a.billtype = b.billtype
13:04:28 42 and a.goodscode=c.goodscode  and (a.shopcode = '0603')
13:04:28  43          按 a.operatetime 分组,
13:04:28  44                    a.billtype,
13 :04:28  45                    a.billid,
13:04:28  46                      备注,
13:04:28  47                    a.otherinouttype,
13:04:28  48                  a.shopcode,
13:04:28  49                      a.storecode,
13:04:28  50                    a.goodscode,
13:04:28  51                    c.shortcode,
13:04:28  52                    c.goodsname,c.brandcode,c.model
13:04:28  x
13 :04: 28  54  其中 x.billtype in(从 t_billlist 中选择 billtype,其中ruleid>0)和
13:04:28  55    x.operatetime >= to_date('2013-6-17','YYYY-MM-DD' )
13:04:28  56    且 x.operatetime 13:04:28  57  ) a  按操作时间、账单类型名称、账单、商店代码、商店名称、商品代码、商品名称或
der by operatime,billtypename,billid,shopcode,shopname,goodscode,goodsname;
select operatime,billtypename,billid,shopcode,shopname,goodscode,goodsname,' ' 期初数量,sum(irealn
umber) irealnumber,DECODE(sum (irealnumber),0,0,round(sum(imoney)/sum(irealnumber),2)) iprice,sum(imo
ney) imoney,sum(orealnumber) orealnumber,DECODE(sum(orealnumber),0, 0,round(sum(omoney)/sum(orealnumb
er),2)) oprice,sum(omoney) omoney,' ' 结存数量 from( select to_char(x.operatetime, 'YYYY-MM-DD') ope
ratetime,x.billtype,
*
第 1 行出现错误:
ORA-03113: 通道通信的文件结尾
进程 ID: 20027
会话 ID: 201 序列号码:149


错误:
ORA-03114:未连接到 Oracle


已使用时间:  00: 00: 02.01

专业改SQL如下后报ORA-600错误:

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!