My Oracle Support Banner

REGEXP_REPLACE Returns Strange Null If Used In Pl/Sql Assignment (Doc ID 1349401.1)

Last updated on OCTOBER 18, 2011

Applies to:

PL/SQL - Version: and later   [Release: 11.2 and later ]
Information in this document applies to any platform.


The REGEXP_REPLACE function returns a strange type of null when used in a PL/SQL assignment with a 3rd argument that is NULL or '' (empty string). This value is detected as NULL but doesn't return an ORA-6502 error when attempting to use as an array_index.

When the REGEXP_REPLACE function is invoked from SQL and the value fetched into a PL/SQL variable, the result is a true NULL and is detected as such and also shows the expected ORA-6502 when attempting to use the value as an index into an array.




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.