Category Archives: PLS Database Error Messages

PLS-00323: subprogram or cursor ‘string’ is declared in a package specification and must be defined in the package body

oracle

PLS-00323: subprogram or cursor 'string' is declared in a package specification and must be defined in the package body
Cause: A subprogram specification was placed in a package specification, but the corresponding subprogram body was not placed in the package body. The package body implements the package specification. So, the package body must contain the definition of every subprogram declared in the package specification.
Action: Check the spelling of the subprogram name. If necessary, add the missing subprogram body to the package body.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00322: declaration of a constant ‘string’ must contain an initialization assignment

oracle

PLS-00322: declaration of a constant 'string' must contain an initialization assignment
Cause: A constant declaration lacks the assignment of an initial value. For example, in the following declaration" := 3.14159" is the initialization clause: "pi constant number := 3.14159;"
Action: Correct the constant declaration by supplying the missing initialization assignment.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00321: expression ‘string’ is inappropriate as the left hand side of an assignment statement

oracle

PLS-00321: expression 'string' is inappropriate as the left hand side of an assignment statement
Cause: The expression does not designate a variable that can have a value assigned to it. For example, the function SYSDATE cannot appear on the left hand side of an assignment statement such as: SYSDATE := '01-JAN-1990';
Action: Correct the illegal assignment statement.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00320: the declaration of the type of this expression is incomplete or malformed

oracle

PLS-00320: the declaration of the type of this expression is incomplete or malformed
Cause: In a declaration, the name of a variable or cursor is misspelled or the declaration makes a forward reference. Forward references are not allowed in PL/SQL. A variable or cursor must be declared before it is referenced it in other statements, including other declarative statements. For example, the following declaration of dept_rec raises this exception because it refers to a cursor not yet declared: 

DECLARE 

dept_rec dept_cur%ROWTYPE; 

CURSOR dept_cur IS SELECT ... 

...
Action: Check the spelling of all identifiers in the declaration. If necessary, move the declaration so that it makes no forward references.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00319: subquery in an IN or NOT IN clause must contain exactly one column

oracle

PLS-00319: subquery in an IN or NOT IN clause must contain exactly one column
Cause: An invalid expression such as X IN (SELECT A,B ...) was used. When a [NOT]IN clause is used with a subquery, it does not test for set membership. The number of expressions in the [NOT]IN clause and the subquery select list must match. So, in the example above, the subquery must specify at most one column.
Action: Change the subquery to select only one column.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00318: type “string” is malformed because it is a non-REF mutually recursive type

oracle

PLS-00318: type "string" is malformed because it is a non-REF mutually recursive type
Cause: A type-declaration such as:

 -- non-REF recursive 

type type t is record (a t); 

or 

-- non-REF mutually dependent types 

type t1; 

type t2 is record (a t1); 

type t1 is record (a t2); was entered.
Action: Use another type to remove the recursion.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00317: incomplete type “string” was not completed in its declarative region

oracle

PLS-00317: incomplete type "string" was not completed in its declarative region
Cause: An incomplete type declaration was not completed in the declarative region where it was declared.
Action: Complete the type appropriately, then retry the operation.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00316: PL/SQL TABLEs must use a single index

oracle

PLS-00316: PL/SQL TABLEs must use a single index
Cause: In the INDEX BY clause of a PL/SQL table declaration, a composite primary key was specified. PL/SQL tables must have a simple, unnamed primary key of a binary integer or VARCHAR2 type.
Action: Use one of the supported key types in the INDEX BY clause.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00315: Implementation restriction: unsupported table index type

oracle

PLS-00315: Implementation restriction: unsupported table index type
Cause: In the INDEX BY clause of a PL/SQL table declaration, a datatype other than BINARY_INTEGER, PLS_INTEGER, or VARCHAR2 was specified. PL/SQL tables can have one column and a primary key. The column can have any scalar type, but the primary key must be either a binary integer type or VARCHAR2.
Action: Use one of the supported key types in the INDEX BY clause.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00314: TABLE declarations are not allowed as PL/SQL local variables

oracle

PLS-00314: TABLE declarations are not allowed as PL/SQL local variables
Cause: In a precompiled program, the DECLARE TABLE statement was mistakenly used inside an embedded PL/SQL block. If an embedded PL/SQL block refers to a database table that does not yet exist, use the DECLARE TABLE statement to tell the precompiler what the table will look like. However, DECLARE TABLE statements are allowed only in the host program.
Action: Move the DECLARE TABLE statement outside the embedded PL/SQL block. If you want a variable that can store an entire row of data selected from a database table or fetched from a cursor or cursor variable, use the %ROWTYPE attribute.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/