Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

CLOB ORA-06502 .getstringval() buffer error

432230May 4 2005 — edited May 4 2005
Hi - I am trying to retrieve data from a clob in an XSQL page using the .getstringval() function and am getting the following (itermittant) error -

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

I also get this error in SQL*Plus when run as a simple query.

From what I read this is due to a limitation of returning more that 4000 characters in Oracle. Since this only happens for specific data I believe this is the case. I have tried increasing the buffer size with both

set serveroutput on buffer 10000000

and set serveroutput on size 10000000

with no luck. Is the only way to return this data without error is to move my query to PL/SQL where the buffer is larger?

The query is below -

select extract(e.MSG_DATA,'//DocumentBody/text()').getstringval() AS DOCBODY
from EDI_TRANS_DATA_STORE e where MSG_ID='00131570406C_SWETSEDI_20050503110803989_3795788770212127391';

Any help is appreciated.
Thanks,
Kevin

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 1 2005
Added on May 4 2005
1 comment
1,533 views