PLS-00216 When Trying to Compile Stored Procedure with 10.2, Which Worked in Previous Versions (Doc ID 341358.1)

Last updated on JULY 05, 2017

Applies to:

PL/SQL - Version: 10.2.0.1 and later   [Release: 10.2 and later ]
Information in this document applies to any platform.
Checked the article for relevance on 26-Nov-2007

Symptoms

When trying to compile the following stored procedure:

create or replace procedure test is
VN_LY_SALES_AMT_SUM NUMBER(42,20) := 0;
begin
VN_LY_SALES_AMT_SUM := 100.1;
end;
/

Results in the following error:
2/38 PLS-00216: NUMBER precision constraint must be in range (1 .. 38)

The error began when the database was upgraded from 9.2 to 10.2.
Till 9.2.0.8 , the code gets compiled without any errors.

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