Skip to Main Content

SQL & PL/SQL

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!

ORA-06502: PL/SQL: numeric or value error: character string buffer too smal

951418Aug 20 2012 — edited Aug 21 2012
Hi

I am getting this ORA-06502: PL/SQL: numeric or value error: character string buffer too small error when i am using dbms_lob.read(V_SABRIX_INDATA, max_varchar_length, v_start, v_text);.

Variable are declared as above
v_start number := 1;
v_text varchar2(32767);
max_varchar_length number := 32767;

V_SABRIX_INDATA CLOB;

v_loop := CEIL(v_clob_length / v_break);
v_start := 1;
FOR i IN 1 .. v_loop LOOP
dbms_lob.read(V_SABRIX_INDATA, max_varchar_length, v_start, v_text); --error
EXIT WHEN v_text IS NULL;
Utl_Http.write_text(v_req, v_text);
v_start := v_start + max_varchar_length;
v_text := null;
END LOOP;

I dont understand tht we are taking 32767 character and putting into the v_Text which has the same length as 32767, then why we are getting this error.

Please help.

When i am declaring the max_varchar_length as 30000 it works fine. please help me as we do not have to chaneg the max_varchar_length.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 18 2012
Added on Aug 20 2012
12 comments
3,429 views