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: 11.2.0.2 and later   [Release: 11.2 and later ]
Information in this document applies to any platform.

Symptoms


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.


Changes

None

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
  Changes
  Cause
  Solution
  References

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

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