My Oracle Support Banner

In R11, When You Run The Procedure, ORA-6502 Occurred(PSD: 606884) (Doc ID 1488364.1)

Last updated on SEPTEMBER 06, 2012

Applies to:

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


When trying to access cursor parameter of type CHAR (no size mentioned) in a PL/SQL block, it may return a very large value compared to what was assigned to
them and throw a 6502  "PL/SQL: numeric or value error" error when attempted to assign to another variable.

A SQL trace reveals that these parameters are getting modified during runtime.

The trace indicates that a lot of spaces are appended to the end of the string. 

For example: A cursor parameter which is of type CHAR was passed a value of '20120331' while opening the cursor and it is getting modified to:

 Observe the empty spaces appended to the end of the string.


To view full details, 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 a vibrant support community of peers and Oracle experts.