Fetching More Than 32760 Characters Into A PL/SQL Variable of Type LONG Fails With ORA-06502 (Doc ID 1009210.6)

Last updated on SEPTEMBER 06, 2012

Applies to:

PL/SQL - Version 8.1.7.0 to 11.2.0.1 [Release 8.1.7 to 11.2]
Information in this document applies to any platform.
***Checked for relevance on 06-Sep-2012***


Symptoms

Executing a PL/SQL procedure that is returning the Oracle error 'ORA-06502: PL/SQL: numeric or value error' when doing one of the following:

  1. SELECT or FETCH a value that has more then 32k Characters into a variable
  2. Concatenate two long variables into a third long variable where the combined value has more than 32k characters.

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms