SQL Language (MOSC)

MOSC Banner

ORA-06502 at the time of dbms_lob.substr

edited Jun 28, 2011 10:36PM in SQL Language (MOSC) 3 commentsAnswered
The below query is failing while the clob column is of size > 8000 bytes. Please advice.

SQL> select dbms_lob.getlength (billing_inventory) from tablea where dbms_lob.getlength (billing_inventory) > 8000;
DBMS_LOB.GETLENGTH(BILLING_INVENTORY)
-------------------------------------

8192

1 row selected.

SQL> SELECT DBMS_LOB.SUBSTR (billing_inventory, 4000, 1), DBMS_LOB.SUBSTR (billing_inventory, 8000, 4001) FROM tablea;

ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 1

Regards, ANirban

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center