My Oracle Support Banner

Appending a NUMBER to a CLOB Incorrectly Raises ORA-06502 Error (Doc ID 746261.1)

Last updated on JUNE 26, 2018

Applies to:

PL/SQL - Version 10.1.0.2 and later
Information in this document applies to any platform.

Symptoms

Concatenating a CLOB with a numer in a loop from 1 to 20000, raises the error

ORA-06502 - PL/SQL numeric or value error

DECLARE
 l_input_xml CLOB;
 l_number PLS_INTEGER := 1;

BEGIN
 l_input_xml := ' ';
 FOR i IN 1..20000 LOOP
  l_input_xml := l_input_xml || i;
 END LOOP;
END;
/



Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.