A script-enabled browser is required for this page to function properly.

PL/SQL V1 conversion utility: Unique names required within a package

In PL/SQL V1, when you created a variable with the same name as a procedure or function in the same package, the variable was always used; the identically named procedure or function was ignored. In versions after V1, variables, functions, and procedures within the same package must be unique.

To avoid an error, make sure all procedures within a package have unique names, either by doing so explicitly, or by appending the word Unused to the procedure name.

Note: In V1, Procedure Builder erroneously allowed you to create a program unit with the same name as a built-in package. In versions after V1, this is not allowed. If Procedure Builder detects a program unit with the same name as a built-in package, Procedure Builder changes the name of the program unit during load time by appending two dollar signs to the end of the program unit name. Thus, DEBUG becomes DEBUG$$.

Example: Renaming procedure names

This example first presents V1 PL/SQL code that will generate a compiler error, then shows how you might edit the code to avoid the error.

Change this code:

PACKAGE pk1 IS
  v1 NUMBER;  v1 is established as a variable
  PROCEDURE v1; v1 is also established as a procedure
  PROCEDURE p2 (x OUT NUMBER);
END;

PACKAGE BODY pk1 IS
  PROCEDURE v1 IS
  BEGIN
    . . .
  END;

  PROCEDURE p2 (x OUT NUMBER) IS
  BEGIN
    x := pk1.v1;
  END;

END;

. . . to this:

PACKAGE pk1 IS
  v1 NUMBER;
  PROCEDURE v1Unused; The procedure v1 is declared Unused
  PROCEDURE p2 (x OUT NUMBER);
END;

PACKAGE BODY pk1 IS
  PROCEDURE v1Unused IS
  BEGIN
    . . .
  END;
  
  PROCEDURE p2 (x OUT NUMBER) IS
  BEGIN
    x := pk1.v1;
  END; 
END; 

See also

About the PL/SQL V1 conversion utility