(使用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 –