dbms_lob.substr is failing with ORA-06502
chakraJun 27 2011 — edited Jun 27 2011The following query is throwing error while doing minus with dbms_lob.substr although 4000
characters are being selected. Column billing_inventory is of CLOB. Please advice.
SQL> select count(1) from llums_feed;
724754
SQL> select count(1) from llums_feed_prv;
0
SQL> SELECT
asset_id,dbms_lob.substr(billing_inventory,4000,1),dbms_lob.substr(billing_inventory,8000,4001)
FROM llums_feed
minus
select asset_id, dbms_lob.substr(billing_inventory,4000,1)
,dbms_lob.substr(billing_inventory,8000,4001)
from llums_feed_prv;
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 1