Category Archives: PLS Database Error Messages

PLS-00233: function name used as an exception name in when clause

oracle

PLS-00233: function name used as an exception name in when clause
Cause: The WHEN clause in an exception handler contains a function call instead of an exception name. A valid exception handler consists of a WHEN clause, which must specify an exception, followed by a sequence of statements to be executed when that exception is raised.
Action: Check the spelling of the identifier in the WHEN clause, then replace the function call with an exception name.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00232: nested packages not permitted

oracle

PLS-00232: nested packages not permitted
Cause: A package was declared inside another package, but package declarations are allowed only at the top level. In other words, packages cannot be nested.
Action: Move the package declaration outside the enclosing package.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00231: function ‘string’ may not be used in SQL

oracle

PLS-00231: function 'string' may not be used in SQL
Cause: A proscribed function was used in a SQL statement. Certain functions such as SQLCODE and SQLERRM can be used only in procedural statements.
Action: Remove the function call from the SQL statement. Or, replace the function call with a local variable. For example, the following statement is illegal: 

INSERT INTO errors VALUES (SQLCODE, SQLERRM);

 However, you can assign the values of SQLCODE and SQLERRM to local variables, then use the variables in the SQL statement, as follows: 

err_num := SQLCODE; 

err_msg := SQLERRM; 

INSERT INTO errors VALUES (err_num, err_msg);

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00230: OUT and IN OUT formal parameters may not have default expressions

oracle

PLS-00230: OUT and IN OUT formal parameters may not have default expressions
Cause: When the formal parameters of a procedure were declared, an OUT or IN OUT parameter was initialized to a default value, as in: 

PROCEDURE calc_bonus (bonus OUT REAL := 00000, ...) IS ... 

However, only IN parameters can be initialized to default values.
Action: Remove the illegal default expression.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00229: Attribute expression within SQL expression

oracle

PLS-00229: Attribute expression within SQL expression
Cause: An attribute expression, such as SQL%NOTFOUND, was used in a SQL statement, but attribute expressions are allowed only in procedural statements.
Action: To workaround this limitation, assign the value of the attribute expression to a variable, then use the variable in the SQL statement. For example, replace the statement: 

INSERT INTO audits VALUES (c1%ROWCOUNT, ...); 

with the following statements: 

row_count := c1%ROWCOUNT; INSERT INTO audits VALUES (row_count, ...);

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00228: Illegal declaration of variable of type LONG

oracle

PLS-00228: Illegal declaration of variable of type LONG
Cause: An attempt was made to declare a variables to be of type LONG. Only columns can be of type LONG.
Action: Remove the offending variable definition.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00227: subprogram ‘in’ formal string is not yet denotable

oracle

PLS-00227: subprogram 'in' formal string is not yet denotable
Cause: When the formal parameters of a subprogram were declared, one parameter was used to initialize another, as in: 

PROCEDURE my_proc (j NUMBER, k NUMBER := j) IS ... 

The first parameter has no value until run time, so it cannot be used to initialize another parameter.
Action: Remove the illegal formal parameter reference.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00226: package ‘string’ used as variable reference

oracle

PLS-00226: package 'string' used as variable reference
Cause: A package was referenced in an expression as if it were a variable or function. Either the name of the variable or function is misspelled or the reference is not fully qualified. For example, to call the function my_function, which is stored in package my_package, dot notation must be used, as follows:

 ... my_package.my_function ...
Action: Correct the spelling of the variable or function name or use dot notation to reference the packaged variable or function.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00225: subprogram or cursor ‘string’ reference is out of scope

oracle

PLS-00225: subprogram or cursor 'string' reference is out of scope
Cause: A subprogram or cursor references a variable that was not declared or is not within the scope of the subprogram or cursor. The variable 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 variable name. 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-00224: object ‘string’ must be of type function or array to be used this way

oracle

PLS-00224: object 'string' must be of type function or array to be used this way
Cause: An identifier being referenced as a function or an array actually represents an object (a number or date, for example) that cannot be referenced in this way.
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/