ORA-06502: PL/SQL: numeric or value error: character string buffer too smal
951418Aug 20 2012 — edited Aug 21 2012Hi
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.