Category Archives: PLS Database Error Messages

PLS-00313: ‘string’ not declared in this scope

oracle

PLS-00313: 'string' not declared in this scope
Cause: There is no declaration for the given identifier within the scope of reference. The identifier might be misspelled, its declaration might be faulty, or the declaration might be placed incorrectly in the block structure.
Action: Check the spelling and declaration of the identifier. Also confirm that the declaration is placed correctly in the block structure.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00312: a positional parameter association may not follow a named association

oracle

PLS-00312: a positional parameter association may not follow a named association
Cause: When a list of parameters is passed to a subprogram or cursor, if both positional and named associations are used, all positional associations must be placed in their declared order and before all named associations, which can be in any order.
Action: Reorder the parameter list to meet the requirements or use named association only.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00311: the declaration of “string” is incomplete or malformed

oracle

PLS-00311: the declaration of "string" is incomplete or malformed
Cause: This occurrence of the identifier cannot be compiled because its type has not been properly defined.
Action: Correct the faulty datatype declaration.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00310: with %ROWTYPE attribute, ‘string’ must name a table, cursor or cursor-variable

oracle

PLS-00310: with %ROWTYPE attribute, 'string' must name a table, cursor or cursor-variable
Cause: The %ROWTYPE attribute must be applied to an identifier declared as a cursor, cursor variable, or database table. This error occurs when %ROWTYPE follows some identifier that has not been so declared.
Action: Change the declaration or do not apply the %ROWTYPE attribute to the identifier.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00309: with %LAST attribute, ‘string’ must be a variable of an enumerated type

oracle

PLS-00309: with %LAST attribute, 'string' must be a variable of an enumerated type
Cause: The "%LAST" attribute must be applied to an identifier that has been declared as a variable of an enumerated type (or subtype of an enumerated type). This error occurs when "%LAST" follows some identifier that has not been so declared.
Action: Make sure that %LAST follows an enumerated type (or subtype of an enumerated type).

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00308: this construct is not allowed as the origin of an assignment

oracle

PLS-00308: this construct is not allowed as the origin of an assignment
Cause: The construct or expression does not designate a value that can be assigned to a variable. For example, the datatype name NUMBER cannot appear on the right hand side of an assignment statement as in X := NUMBER.
Action: Correct the illegal assignment statement.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00307: too many declarations of ‘string’ match this call

oracle

PLS-00307: too many declarations of 'string' match this call
Cause: The declaration of a subprogram or cursor name is ambiguous because there was no exact match between the declaration and the call and more than one declaration matched the call when implicit conversions of the parameter datatypes were used. The subprogram or cursor name might be misspelled, its declaration might be faulty, or the declaration might be placed incorrectly in the block structure.
Action: Check the spelling and declaration of the subprogram or cursor name. Also confirm that it's call is correct, it's parameters are of the right datatype, and, if it is not a built-in function, that it's declaration is placed correctly in the block structure.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00306: wrong number or types of arguments in call to ‘string’

oracle

PLS-00306: wrong number or types of arguments in call to 'string'
Cause: This error occurs when the named subprogram call cannot be matched to any declaration for that subprogram name. The subprogram name might be misspelled, a parameter might have the wrong datatype, the declaration might be faulty, or the declaration might be placed incorrectly in the block structure. For example, this error occurs if the built-in square root function SQRT is called with a misspelled name or with a parameter of the wrong datatype.
Action: Check the spelling and declaration of the subprogram name. Also confirm that its call is correct, its parameters are of the right datatype, and, if it is not a built-in function, that its declaration is placed correctly in the block structure.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00305: previous use of ‘string’ (at line string) conflicts with this use

oracle

PLS-00305: previous use of 'string' (at line string) conflicts with this use
Cause: While looking for prior declarations of a cursor, procedure, function, or package, the compiler found another object with the same name in the same scope. Or, the headers of subprogram in a package specification and body do not match word for word.
Action: Check the spelling of the cursor, procedure, function, or package name. Also check the names of all constants, variables, parameters, and exceptions declared in the same scope. Then, remove or rename the object with the duplicate name. Or, change the headers of the packaged subprogram so that they match word for word.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00304: cannot compile body of ‘string’ without its specification

oracle

PLS-00304: cannot compile body of 'string' without its specification
Cause: The compiled package specification required to compile a package body could not be found. Some possible causes follow: 

     the package name is misspelled 

     the package specification was never compiled 

     the compiled package specification is not accessible 

The package specification must be compiled before compiling the package body, and the compiler must have access to the compiled specification.
Action: Check the spelling of the package name. Compile the package specification before compiling the package body. Also, make sure the compiler has access to the compiled specification.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/