其他分享
首页 > 其他分享> > ORA-22922: 不存在的 LOB 值解决办法

ORA-22922: 不存在的 LOB 值解决办法

作者:互联网

报错语句:

select n1.cpname,n1.cids ,xx.* from (
select 
t.cpname,max(t.dz) dz ,count(cid) sbs,to_char( wm_concat(t.cid)) cids  
from VIEW_YQJMTZ_CID_INFO t where t.lx = '1'
group by t.cpname ) n1, VIEW_YQJMTZ_CID_INFO xx
where n1.cpname = xx.cpname

但是单独执行里面的子查询不报错

select 
t.cpname,max(t.dz) dz ,count(cid) sbs,to_char( wm_concat(t.cid)) cids  
from VIEW_YQJMTZ_CID_INFO t where t.lx = '1'
group by t.cpname 

 

修改后语句:

select n1.cpname,to_char(n1.cids) ,xx.* from (
select 
t.cpname,max(t.dz) dz ,count(cid) sbs, wm_concat(t.cid) cids  
from VIEW_YQJMTZ_CID_INFO t where t.lx = '1'
group by t.cpname ) n1, VIEW_YQJMTZ_CID_INFO xx
where n1.cpname = xx.cpname

 

初步判断,应该是wm_concat函数处理过的字段为clob类型,需要进行关联时,不能先进行to_char,只能在最后数据查询结果展示层进行to_char.

 

标签:LOB,char,cid,22922,xx,dz,cpname,n1,ORA
来源: https://www.cnblogs.com/wanglwl/p/13615470.html