(使用Oracle 11.2)获取ORA-22922(不存在LOB值)或者没有结果与wm_concat在所有的()
我有类似
wm_concat(distinct abc)
一个相当复杂的SQL,预计到返回一些varchar2(4000)
兼容结果。
它导致ORA-00932: inconsistent datatypes
在我选择的某些coalesce(some_varchar_col, wm_concat(...))
中使用。
所以我试图通过两种不同的方法铸造它:
dbms_lob.substr(..., 4000) -- L) tried even with 3000 in case of "unicode byte blow-up"
cast(... as varchar2(4000)) -- C) tried even with 3000 in case of "unicode byte blow-up"
(将在视图中使用,但玩弄它表明,它是不相关的意见)
取决于柱等运营商我要么得到N)无结果或O)ORA-22922
:
select * from view_with_above_included where rownum <= 100
N)我的Eclipse数据浏览器JDBC连接返回没有任何结果(无结果没有列,没有
(0 rows effected)
,只有查询时间统计)。 (?它可以是一个内部异常不作这样的处理)O)
ORA-22922: nonexistent LOB value ORA-06512: in "SYS.DBMS_LOB", line 1092 ORA-06512: in line 1
奇怪以下测试查询工作:
-- rownum <= 100 would already cause the above problems
select * from view_with_above_included where rownum <= 10
或
select * from view_with_above_included
但是查看实际的聚合数据不会显示聚合的数据,其长度将超过1000个字符。
这可能与:http://stackoverflow.com/questions/12969274,https://community.oracle.com/thread/2383469 –