In 11G using PRIVATE Keyword in Package SPEC Fails with PLS-00103

(Doc ID 1359438.1)

Last updated on JULY 05, 2017

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


In 11g using PRIVATE keyword in function definition in Package Spec Fails with PLS-00103.

The exact same code works fine  prior to 11g  i.e in database versions 10.2 or earlier.

CREATE OR REPLACE PACKAGE TEST_MISCDATAPACKAGE AS
   PRIVATE FUNCTION ISNUMERIC ( ACCT in varchar2) return number;
END TEST_MISCDATAPACKAGE;
/

Error

Errors for PACKAGE TEST_MISCDATAPACKAGE:

LINE/COL ERROR
-----------------------------------------------------------------
2/18 PLS-00103: Encountered the symbol "ISNUMERIC" when expecting one of the following:
:= . ( @ % ; not null range default character
The symbol ":=" was substituted for "ISNUMERIC" to continue.

2/38 PLS-00103: Encountered the symbol "VARCHAR2" when expecting one of the following:
(3/1 PLS-00103: Encountered the symbol "END" when expecting one of the following:
begin function pragma procedure subtype type <an identifier>
<a double-quoted delimited-identifier> current cursor delete
exists prior

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