This package will not compile because the specification and body do not match. : Compile Error « PL SQL « Oracle PL / SQL






This package will not compile because the specification and body do not match.

    
SQL>
SQL> CREATE OR REPLACE PACKAGE PackageA AS
  2     FUNCTION FunctionA(p1 IN NUMBER,p2 IN DATE)
  3       RETURN VARCHAR2;
  4   END PackageA;
  5   /

Package created.

SQL>
SQL>
SQL>
SQL> CREATE OR REPLACE PACKAGE BODY PackageA AS
  2     FUNCTION FunctionA(p1 IN CHAR)
  3       RETURN VARCHAR2;
  4   END PackageA;
  5   /

Warning: Package Body created with compilation errors.

SQL>
SQL>
SQL>
SQL> show errors
Errors for PACKAGE BODY PACKAGEA:

LINE/COL ERROR
-------- -----------------------------------------------------------------
2/13     PLS-00323: subprogram or cursor 'FUNCTIONA' is declared in a
         package specification and must be defined in the package body

2/13     PLS-00328: A subprogram body must be defined for the forward
         declaration of FUNCTIONA.

SQL>
SQL>

   
    
    
    
  








Related examples in the same category

1.Check the error
2.Check error for procedure
3.Check error form stored procedure
4.PLS-00306: wrong number or types of arguments in call
5.PLS-00363: expression '3' cannot be used as an assignment target
6.Set the PLSQL_WARNING level to DISABLE:ALL
7.This example illustrates the PLS-483 error
8.Build an anonymous block that will trigger an error.
9.how DDL doesn't work with PL/SQL