Oracle7 Server Messages

Contents Index Home Previous Next

PL/SQL Error Messages

PLS-00101 reserved for future use

Not in Release 2.3.

PLS-00102 parser stack overflow because nesting is too deep

Cause:The parser, which checks the syntax of PL/SQL statements, uses a data structure called a stack; the number of levels of nesting in the PL/SQL block exceeded the stack capacity.
Action:Reorganize the block structure to avoid nesting at too deep a level. For example, move the lowest-level sub-block to a higher level.
PLS-00103 found str but expected one of the following: str

Cause:This error message is from the parser. It found a token (language element) that is inappropriate in this context.
Action:Check previous tokens as well as the one given in the error message. The line and column numbers given in the error message refer to the end of the faulty language construct.
PLS-00104 empty argument list in call of procedure name must be omitted

Cause:In a subprogram call, the name of the subprogram was followed by an empty parameter list. For example, procedure P was called as P(). This is not allowed.
Action:Remove the empty parameter list. In the example, change the procedure call to P.
PLS-00105 at most one forward declaration of type name is permitted

Not in Release 2.3.

PLS-00108 declarative units must be a single variable declaration

Cause:While checking a declarative unit (a top-level declare block without the BEGIN...END), PL/SQL found that there was more than one item declared or that the item was not a variable declaration. A table is a common variable declaration at the unit level. To define a TABLE, compile a DECLARE compilation unit, but only one at a time is allowed.
Action:Declare variables in separate declarative units.
PLS-00109 unknown exception name name in PRAGMA EXCEPTION_INIT

Cause:No declaration for the exception name referenced in an EXCEPTION_INIT pragma was found within the scope of the pragma.
Action:Make sure the pragma follows the exception declaration and is within the same scope.
PLS-00110 bind variable name not allowed in this context

Cause:A bind variable, that is, an identifier prefixed with a colon, was found in an inappropriate context.
Action:Remove the colon or replace the bind variable with the appropriate object.
PLS-00111 end-of-file in comment

Cause:A comment had a comment initiator (/*), but before the comment terminator (*/) was found, an end-of-file marker was encountered.
Action:Remove the comment initiator or add a comment terminator. The line and column numbers accompanying the error message refer to the beginning of the last legal token before the comment initiator.
PLS-00112 end-of-line in quoted identifier

Cause:A quoted identifier had a beginning quote ("), but before the ending quote (") was found, an end-of-line marker was encountered.
Action:Remove the beginning quote or add the ending quote. The line and column numbers accompanying the error message refer to the beginning of the quoted identifier.
PLS-00113 END identifier name1 must match name2 at line num, column num

Cause:Following the keyword END, which terminates some language constructs (such as loops, blocks, functions, and procedures), you can optionally place the name of that construct. For example, at the end of the definition of loop L you might write END L.

Action:Make sure the spelling of the END identifier matches the name given to the language construct and that the block structure is correct.
PLS-00114 identifier name too long

Cause:The name of a PL/SQL variable is longer than 30 characters. Legal identifiers (including quoted identifiers) have a maximum length of 30 characters. A string literal might have been mistakenly enclosed in double quotes instead of single quotes, in which case PL/SQL considers it a quoted identifier.
Action:Shorten the name to 30 characters or less. If a string literal is being used, replace the double quotes with single quotes.
PLS-00115 this PRAGMA must follow the declaration of name

Cause:The pragma refers to a PL/SQL object that was not declared or is not within the scope of the reference. Identifiers must be declared before they are used in a pragma; forward references are not allowed.
Action:Check the spelling and declaration of the identifier. Also confirm that the declaration is placed correctly in the block structure.
PLS-00116 duplicate WHERE clause in table expression

Cause:Two or more WHERE clauses were found in a DELETE, SELECT, or UPDATE statement. The WHERE clause specifies a condition under which rows in a table are processed. The condition can contain several logical expressions connected by AND or OR, but a statement can contain only one WHERE clause.
Action:Remove one of the WHERE clauses and, if necessary, connect logical expressions by AND or OR.
PLS-00117 duplicate CONNECT BY clause in table expression

Cause:Two or more CONNECT BY clauses were found in a SELECT statement. The CONNECT BY clause defines a relationship used to return rows in a hierarchical order. The relationship can contain two expressions separated by a relational operator (such as = or !=), but a statement can contain only one CONNECT BY clause.
Action:Remove one of the CONNECT BY clauses and, if necessary, separate expressions by a relational operator.
PLS-00118 duplicate GROUP BY clause in table expression

Cause:Two or more GROUP BY clauses were found in a SELECT statement. The GROUP BY clause lists column expressions used to form a summary row for each group of selected rows. The list can contain several column expressions separated by commas, but a statement can contain only one GROUP BY clause.
Action:Remove one of the GROUP BY clauses and, if necessary, separate column expressions by commas.
PLS-00119 duplicate HAVING clause in table expression

Cause:Two or more HAVING clauses were found in a SELECT statement. The HAVING clause specifies a condition under which groups of rows (formed by the GROUP BY clause) are included in the result. The condition can include several logical expressions connected by AND or OR, but a statement can contain only one HAVING clause.
Action:Remove one of the HAVING clauses and, if necessary, connect logical expressions by AND or OR.
PLS-00120 inappropriate argument in OPEN statement

Cause:The cursor_name parameter in an OPEN statement is misspelled or does not refer to a legally declared cursor.
Action:Check the spelling of the cursor_name parameter. Make sure the cursor was declared properly.
PLS-00121 only the set function COUNT may take * as an argument

Cause:The asterisk (*) option was used in the argument list of a SQL group function other than COUNT. For example, the code might look like

SELECT SUM(*) INTO emp_count FROM emp;  -- should be COUNT(*)

Action:Remove the asterisk option from the argument list and replace it with an expression that refers to one or more database columns.
PLS-00123 program too large

Cause:PL/SQL was designed primarily for robust transaction processing. One consequence of the special-purpose design is that the PL/SQL compiler imposes a limit on block size. The limit depends on the mix of statements in the PL/SQL block. Blocks that exceed the limit cause this error.
Action:The best solution is to modularize the program by defining subprograms, which can be stored in an Oracle database. Another solution is to break the program into two sub-blocks. Have the first block INSERT any data the second block needs into a temporary database table. Then, have the second block SELECT the data from the table.
PLS-00124 name of exception expected for first argument in EXCEPTION_INIT pragma

Cause:The first argument passed to the EXCEPTION_INIT pragma was something other than an exception name. The first argument must be the name of a legally declared exception.
Action:Replace the first argument with the name of a legally declared exception.
PLS-00125 type name expected

Cause:When a constant or variable was declared, its datatype was not specified. For example, the code might look like

pi  CONSTANT := 3.14159;  -- should be CONSTANT REAL := 3.14159

Action:Supply the missing datatype specifier.
PLS-00126 selector ALL is not allowed

Cause:The ALL shortcut for specifying system privileges or statement options was used in a SQL statement. PL/SQL does not support the ALL shortcut.
Action:Remove the ALL shortcut from the SQL statement.
PLS-00127 pragma name is not a supported pragma

Cause:The named pragma (compiler directive) is not among those supported by PL/SQL. The pragma name might be misspelled, or the pragma syntax might be faulty.
Action:Check the spelling of the pragma name, and make sure the proper syntax was used.
PLS-00128 illegal number of arguments for pragma name

Cause:The number of arguments (actual parameters) passed to the named pragma (compiler directive) is incorrect. A required argument was omitted from the argument list, or the pragma syntax is faulty (for example, a comma might be missing between two parameters).
Action:Supply the missing argument, or correct the faulty syntax.
PLS-00129 pragma INTERFACE only supports C as its first argument

Cause:The first parameter passed to pragma INTERFACE specified a host language other than C. Currently, C is the only host language supported. The parameter might be misspelled, or the pragma syntax might be faulty (for example, a comma might be missing between two parameters).
Action:Check the spelling of the first parameter, which should be C, and make sure the proper syntax was used.
PLS-00130 pragma name expects 1st argument to be a procedure/function/package/ cursor

Cause:The first argument (actual parameter) passed to the named pragma (compiler directive) was not the name of a subprogram, package, or cursor, as required. The parameter might be misspelled, or the pragma syntax might be faulty (for example, a comma might be missing between two parameters).
Action:Check the spelling of the first parameter, and make sure the proper syntax was used.
PLS-00131 pragma name expects 2nd argument to be a procedure

Cause:The second argument (actual parameter) passed to the named pragma (compiler directive) was not the name of a procedure, as required. The parameter might be misspelled, or the pragma syntax might be faulty (for example, a comma might be missing between two parameters).
Action:Check the spelling of the second parameter, and make sure the proper syntax was used.
PLS-00132 pragma RESTRICT_REFERENCES does not support str

Cause:One of the parameters passed to pragma RESTRICT_REFERENCES was not among the following, as required: WNDS, WNPS, RNDS, RNPS. The parameter might be misspelled, or the pragma syntax might be faulty (for example, a comma might be missing between two parameters).
Action:Check the spelling of all the parameters, and make sure the proper syntax was used.
PLS-00133 pragma name expects 1st argument to be an identifier or string literal

Cause:The first argument (actual parameter) passed to the named pragma (compiler directive) was not an identifier or string literal, as required. The parameter might be misspelled, or the pragma syntax might be faulty (for example, a comma might be missing between two parameters).
Action:Check the spelling of the first parameter, and make sure the proper syntax was used.
PLS-00134 pragma name expects 2nd argument to be an identifier

Cause:The second argument (actual parameter) passed to the named pragma (compiler directive) was not an identifier, as required. The parameter might be misspelled, or the pragma syntax might be faulty (for example, a comma might be missing between two parameters).
Action:Check the spelling of the second parameter, and make sure the proper syntax was used.
PLS-00135 pragma name expects 3rd argument to be an identifier or string literal

Cause:The third argument (actual parameter) passed to the named pragma (compiler directive) was not an identifier or string literal, as required. The parameter might be misspelled, or the pragma syntax might be faulty (for example, a comma might be missing between two parameters).
Action:Check the spelling of the third parameter, and make sure the proper syntax was used.
PLS-00136 pragma name expects 3rd argument to be an empty string

Cause:The third argument (actual parameter) passed to the named pragma (compiler directive) was not an empty string, as required. The parameter might be miscoded, or the pragma syntax might be faulty (for example, a comma might be missing between two parameters).
Action:Check the coding of the third parameter, and make sure the proper syntax was used.
PLS-00137 pragma name expects 4th argument to be a numeric-literal

Cause:The fourth argument (actual parameter) passed to the named pragma (compiler directive) was not a numeric literal, as required. The parameter might be miscoded, or the pragma syntax might be faulty (for example, a comma might be missing between two parameters).
Action:Check the coding of the fourth parameter, and make sure the proper syntax was used.
PLS-00201 identifier name must be declared

Cause:An attempt was made to reference an undefined variable, exception, procedure, function, or other object. Either the identifier was not declared or it was not within the scope of the reference.
Action:Check the spelling and declaration of the identifier. Also confirm that the declaration is placed correctly in the block structure.
PLS-00202 type name must be declared

Cause:An attempt was made to reference an undefined type. Either the type specifier was not declared or it is not within the scope of the reference.
Action:Check the spelling and declaration of the type specifier. Also confirm that the declaration is placed correctly in the block structure.
PLS-00203 function DECODE must be called with at least 3 non-Boolean arguments

Cause:Less than three arguments were passed to the built-in function DECODE. Though DECODE takes a variable number of (non-Boolean) arguments, at least three arguments must be passed.
Action:Call DECODE with three or more arguments.
PLS-00204 function or pseudo-column name may be used inside a SQL statement only

Cause:A pseudocolumn or proscribed function was used in a procedural statement. The SQL pseudocolumns (CURRVAL, LEVEL, NEXTVAL, ROWID, ROWNUM) can be used only in SQL statements. Likewise, certain functions such as DECODE, DUMP, and VSIZE and the SQL group functions (AVG, MIN, MAX, COUNT, SUM, STDDEV, VARIANCE) can be used only in SQL statements.
Action:Remove the pseudocolumn reference or function call from the procedural statement. Or, replace the procedural statement with a SELECT INTO statement; for example, replace

bonus := DECODE(rating, 1, 5000, 2, 2500, ...);

SELECT DECODE(rating, 1, 5000, 2, 2500, ...) INTO bonus FROM dual;

PLS-00205 aggregate not allowed here

Cause:An aggregate, that is, a parenthesized list of values such as (7788, 'SCOTT', 20), was found in an inappropriate context.
Action:Remove or relocate the aggregate.
PLS-00206 %TYPE must be applied to a variable or column, not name

Cause:The program object declared using the %TYPE datatype attribute is not of the appropriate class. It must be a variable, column, record component, subprogram formal parameter, or other object to which values can be assigned.
Action:Declare an object of the appropriate class or define the datatype in another way (for example, use %ROWTYPE).
PLS-00207 identifier name, applied to implicit cursor SQL, is not a legal cursor attribute

Cause:An identifier that is not a cursor attribute was applied to the identifier SQL. For example, this error occurs if the cursor attribute is misspelled.
Action:Check the spelling of the cursor attribute name. Make sure the attribute is one of these: %NOTFOUND, %FOUND, %ROWCOUNT, %ISOPEN.
PLS-00208 identifier name is not a legal cursor attribute

Cause:An identifier not declared as a cursor attribute was applied to an identifier declared as a cursor. For example, this error occurs if the cursor attribute is misspelled.
Action:Check the spelling of the cursor attribute name. Make sure the attribute is one of these: %NOTFOUND, %FOUND, %ROWCOUNT, %ISOPEN.
PLS-00209 table name is not in FROM clause

Cause:In a query, a table referenced by the select list is not named in the FROM clause.
Action:Check the spelling of the table names, make sure each column in the select list refers to a table in the FROM clause, then re-execute the query.
PLS-00210 an OTHERS clause is required in this CASE statement

Not in Release 2.3.

PLS-00211 CASE labels or ranges must not be duplicated in different WHEN clauses

Not in Release 2.3.

PLS-00212 could not obtain enough memory to compile CASE statement

Not in Release 2.3.

PLS-00213 package STANDARD not accessible

Cause:The PL/SQL compiler could not find package STANDARD in the current Oracle database. To compile a program, PL/SQL needs package STANDARD.
Action:Make sure that package STANDARD is available in the current Oracle database, then retry the operation.
PLS-00214 BEGIN...END block nesting is too deep

Cause:The number of levels of nesting in the PL/SQL block is too large. Blocks can be nested up to 255 levels deep, depending on the availability of system resources such as memory.
Action:Reorganize the block structure to avoid nesting at too deep a level. For example, move the lowest-level sub-block to a higher level.
PLS-00215 string length constraints must be in range (1 .. 32767)

Cause:When a character variable was declared, a length outside the legal range was specified. For example, the following declarations are illegal:

flag  CHAR(0);        -- illegal; zero length
name  VARCHAR2(-10);  -- illegal; negative length

Action:Change the length constraint, making sure that it lies in the range 1 .. 32767
PLS-00216 NUMBER precision constraint must be in range (1 .. 38)

Cause:A NUMBER variable was declared with a precision that is outside the legal range. Declarations such as N NUMBER(800) or N NUMBER(123,10) are not supported.
Action:Change the illegal NUMBER precision constraint, making sure that it lies in the range 1 .. 38.
PLS-00217 NUMBER scale constraint must be in range (-84 .. 127)

Cause:A NUMBER variable was declared with a scale that is outside the legal range. Declarations such as N NUMBER(10,345) or N NUMBER(10,-100) are not supported.
Action:Change the illegal NUMBER scale constraint, making sure that it lies in the range -84 .. 127.
PLS-00218 a variable declared NOT NULL must have an initialization assignment

Cause:In general, variables that have no initialization clause in their declaration are automatically initialized to NULL. This is illogical for NOT NULL variables; therefore, an initialization clause is required.
Action:Add an initialization clause to the variable declaration.
PLS-00219 label name reference is out of scope

Cause:A block or loop label was used to qualify a variable (as in outer_block.date) that was not declared or is not within the scope of the label. 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.
PLS-00220 simple name required in this context

Cause:A qualified name such as A.B or A.B.C is not permitted here.
Action:Use a simple name such as A instead.
PLS-00221 name is not a procedure or is undefined

Cause:An identifier being referenced as a procedure was not declared or actually represents another object (for example, it might have been declared as a function).
Action:Check the spelling and declaration of the identifier. Also confirm that the declaration is placed correctly in the block structure.
PLS-00222 no function with name name exists in this scope

Cause:An identifier being referenced as a function was not declared or actually represents another object (for example, it might have been declared as a procedure).
Action:Check the spelling and declaration of the identifier. Also confirm that the declaration is placed correctly in the block structure.
PLS-00223 parameterless procedure name used as function

Cause:An identifier being referenced as a parameterless function actually represents a procedure.
Action:Check the spelling and declaration of the identifier. Also confirm that the declaration is placed correctly in the block structure. If necessary, change the declaration of the identifier or change the reference so that it does not require a return value.
PLS-00224 object name 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.
PLS-00225 subprogram or cursor name 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.
PLS-00226 package name 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.
PLS-00227 subprogram IN formal name 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 ...

Action:Remove the illegal formal parameter reference.
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 work around 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, ...);

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

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 := 0, ...) IS ...

Action:Remove the illegal default expression.
PLS-00231 function name 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);

err_num := SQLCODE;
err_msg := SQLERRM;
INSERT INTO errors VALUES (err_num, err_msg);

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.
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.
PLS-00302 component name must be declared

Cause:In a reference to a component (for example, in the name A.B, B is a component of A), the component was not declared. The component 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 component. Also confirm that the declaration is placed correctly in the block structure.
PLS-00303 qualifier name must be declared

Cause:In a name such as A.B, A is a qualifier, and B is a component of the qualifier. This error occurs when no declaration for the qualifier is found. The qualifier 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 qualifier. Also confirm that the declaration is placed correctly in the block structure.
PLS-00304 cannot compile body of name 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

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.
PLS-00305 previous use of name 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.
PLS-00306 wrong number or types of arguments in call to name

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.
PLS-00307 too many declarations of name match this call

Cause:The declaration of a subprogram 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 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 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.
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.
PLS-00309 with %LAST attribute, name must be a variable of an enumerated type

Not in Release 2.3.

PLS-00310 with %ROWTYPE attribute, name 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.
PLS-00311 the declaration of the type of name is incomplete or malformed

Cause:This occurrence of the identifier cannot be compiled because its datatype has not been properly defined.
Action:Correct the faulty datatype declaration.
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.
PLS-00313 name 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.
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.
PLS-00315 PL/SQL TABLE declarations must currently use BINARY_INTEGER indexes

Cause:In the INDEX BY clause of a PL/SQL table declaration, a datatype other than BINARY_INTEGER 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 have type BINARY_INTEGER.
Action:Change the datatype specifier to BINARY_INTEGER.
PLS-00316 PL/SQL tables must currently use a single BINARY_INTEGER 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 type BINARY_INTEGER.
Action:Change the faulty clause to INDEX BY BINARY_INTEGER.
PLS-00319 subquery in an IN or NOT IN clause must contain exactly one column

Cause:An invalid expression such as

a IN (SELECT x, y, z FROM ... )

Action:Change the subquery to select only one column.
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.
PLS-00321 expression str 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.
PLS-00322 declaration of a constant name 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.
PLS-00323 subprogram name 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.
PLS-00324 cursor attribute may not be applied to non-cursor name

Cause:This error occurs when a cursor attribute (%FOUND, %NOTFOUND, %ROWCOUNT, or %ISOPEN) appears following an identifier not declared as a cursor or cursor variable. It occurs, for example, if the variable name my_cur in my_cur%FOUND was not properly declared as a cursor or if the variable declaration was 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.
PLS-00325 non-integral numeric literal num is inappropriate in this context

Cause:A non-integer numeric literal was used in a context that requires an integer (a number with no decimal point).
Action:Replace the inappropriate literal with an integer literal.
PLS-00326 IN clause must contain same number of expressions as subquery

Cause:The number of expressions in an IN clause did not equal the number of expressions in a corresponding subquery select list. For example, the following statement is invalid because the IN clause contains two expressions, but the subquery select list contains just one:

... WHERE (ename, sal) IN (SELECT sal FROM emp);

Action:Check the number of expressions in each set, then revise the statement to make the numbers equal.
PLS-00327 'name' is not in SQL scope here

Cause:In a SQL statement, a reference was made to an out-of-scope database object. The referenced object might be misspelled, or the reference might be mixed, as in the following example:

CURSOR c1 IS SELECT dept.dname FROM emp;

Action:Check the spelling of all database objects in the SQL statement, and make sure all references are to objects within the current scope.
PLS-00328 a subprogram body must be defined for the forward declaration of name

Cause:A subprogram specification was declared, but the corresponding subprogram body was not defined. Write the subprogram specification and body as a unit. An alternative solution is to separate the specification from its body, which is necessary when you want to define mutually recursive subprograms or you want to group subprograms in a package.
Action:Check the spelling of the subprogram name. If necessary, supply the missing subprogram body.
PLS-00330 invalid use of type name or subtype name

Cause:A datatype or subtype specifier was mistakenly used in place of a constant, variable, or expression. For example, the code might look like

IF emp_count > number THEN ... -- illegal; NUMBER is a datatype specifier

Action:Replace the datatype or subtype specifier with a valid constant, variable, or expression.
PLS-00335 a package name conflicts with an existing object

Cause:In a CREATE PACKAGE statement, a package (which is a database object that groups logically related PL/SQL types, objects, and subprograms) was given the same name as an existing database object.
Action:Give the package a unique name.
PLS-00341 declaration of cursor name is incomplete or malformed

Cause:A cursor declaration is improper or an identifier referenced in the cursor declaration was not properly declared. A return type that does not refer to an existing database table or a previously declared cursor or cursor variable might have been specified. For example, the following cursor declaration is illegal because c1 is not yet fully defined:

CURSOR c1 RETURN c1%ROWTYPE IS SELECT ...  -- illegal

Action:Check the spelling and declaration of the cursor name and any identifiers referenced in the cursor declaration. Also confirm that the declaration is placed correctly in the block structure. If a return type was specified, make sure that it refers to an existing database table or a previously declared cursor or cursor variable.
PLS-00351 not logged on to database name

Cause:An attempt was made to access an Oracle database without being logged on. Probably, an invalid username or password was entered.
Action:Log on to Oracle with a correctly spelled username and password before trying to access the database.
PLS-00352 unable to access another database name

Cause:An attempt was made to reference an object in a database other than the current local or remote Oracle database.
Action:Correct the reference and make sure the object is in the current Oracle database.
PLS-00353 name must name a user in the database

Cause:This error occurs when the username was misspelled or when the user does not exist in the database.
Action:Check the spelling of the username and make sure the user exists.
PLS-00354 username must be a simple identifier

Cause:A qualified username such as scott.accts is not permitted in this context.
Action:Specify a simple username such as scott instead.
PLS-00355 use of PL/SQL table not allowed in this context

Cause:A PL/SQL table was referenced in the wrong context (for example, with a remote link).
Action:Remove the PL/SQL table reference or change the context.
PLS-00356 name must name a table to which the user has access

Cause:The named table is not accessible to the user. This error occurs when the table name or username was misspelled, the table and/or user does not exist in the database, the user was not granted the necessary privileges, or the table name duplicates the name of a local variable or loop counter.
Action:Check the spelling of the table name and username. Also confirm that the table and user exist, the user has the necessary privileges, and the table name does not duplicate the name of a local variable or loop counter.
PLS-00357 table, view or sequence reference name not allowed in this context

Cause:A reference to database table, view, or sequence was found in an inappropriate context. Such references can appear only in SQL statements or (excluding sequences) in %TYPE and %ROWTYPE declarations. Some valid examples follow:

SELECT ename, emp.deptno, dname INTO my_ename, my_deptno, my_dept
   FROM emp, dept WHERE emp.deptno = dept.deptno;
DECLARE
   last_name  emp.ename%TYPE;
   dept_rec   dept%ROWTYPE;

Action:Remove or relocate the illegal reference.
PLS-00358 column name exists in more than one table; use qualifier

Cause:The statement is ambiguous because it specifies two or more tables having the same column name. For example, the following statement is ambiguous because deptno is a column in both tables:

SELECT deptno, loc INTO my_deptno, my_loc FROM emp, dept;

Action:Precede the column name with the table name (as in emp.deptno) so that the column reference is unambiguous.
PLS-00359 assignment target in str must have components

Cause:An assignment target was declared that lacks the components needed to store the assigned values. For example, this error occurs if you try to assign a row of column values to a variable instead of a record, as follows:

DECLARE
   dept_rec  dept%ROWTYPE;
   my_deptno dept.deptno%TYPE;
   ...
BEGIN
   SELECT deptno, dname, loc INTO my_deptno  -- invalid
      FROM dept WHERE ...

Action:Check the spelling of the names of the assignment target and all its components. Make sure the assignment target is declared with the required components and that the declaration is placed correctly in the block structure.
PLS-00360 cursor declaration without body needs return type

Cause:A cursor declaration lacks either a body (SELECT statement) or a return type. If you want to separate a cursor specification from its body, a return type must be supplied, as in

CURSOR c1 RETURN emp%ROWTYPE;

Action:Add a SELECT statement or return type to the cursor declaration.
PLS-00361 a cursor variable must be IN OUT to be OPENed

Cause:A cursor variable was declared as the IN or OUT formal parameter of a subprogram that, when called, will change the state of the cursor variable. In such cases, the cursor variable must be declared as an IN OUT parameter.
Action:Change the parameter mode from IN or OUT to IN OUT.
PLS-00362 invalid cursor return type; 'name' must be a record type

Cause:In a cursor specification or REF CURSOR type definition, a non-record type such as NUMBER or TABLE was specified as the return type. This is not allowed. Only the following return types are allowed:
· <record_type_name>

· <record_name>%TYPE

· <table_name>%ROWTYPE

· <cursor_name>%ROWTYPE

· <cursor_variable_name>%ROWTYTPE

Action:Revise the cursor specification or REF CURSOR type definition so that it specifies one of the above return types.
PLS-00363 expression str cannot be used as an assignment target

Cause:A literal, constant, IN parameter, loop counter, or function call was mistakenly used as the target of an assignment. For example, the following statement is illegal because the assignment target, 30, is a literal:

SELECT deptno INTO 30 FROM dept WHERE ...  -- illegal

Action:Correct the statement by using a valid assignment target.
PLS-00363 expression str cannot be used as an assignment target

Cause:A literal, constant, IN parameter, loop counter, or function call was mistakenly used as the target of an assignment. For example, the following statement is illegal because the assignment target, 30, is a literal:

SELECT deptno INTO 30 FROM dept WHERE ...  -- illegal

Action:Correct the statement by using a valid assignment target.
PLS-00364 loop index variable name use is invalid

Cause:A reference to a loop counter was found in an inappropriate context. For example, the following statement is illegal because the loop counter is used as the terminal value in its own range expression:

FOR j IN 1 .. j LOOP ...  -- illegal

Action:Change the loop range expression so that it does not reference the loop counter. If you want to refer in the range expression to another variable with the same name as the loop counter, change either name or qualify the variable name with a label.
PLS-00365 name is an OUT parameter and cannot be read

Cause:An attempt was made to assign the value of an OUT parameter to another parameter or variable. Inside a procedure, an OUT parameter acts like an uninitialized variable; therefore, its value cannot be read. For example, the following assignments are illegal:

PROCEDURE calc_bonus (bonus OUT REAL, ...) IS
   rating  REAL;
   wages   REAL;
BEGIN
   ...
   IF rating > 90 THEN
      bonus := bonus * 2;  -- illegal
      SELECT sal + bonus INTO wages FROM emp ...  -- illegal
      ...
   END IF;
   ...
END calc_bonus;

Action:Use an IN OUT parameter instead of the OUT parameter. Inside a procedure, an IN OUT parameter acts like an initialized variable; therefore, its value can be read.
PLS-00366 subtype of a NOT NULL type must also be NOT NULL

Cause:After a subtype was defined as NOT NULL, it was used as the base type for another subtype defined as NULL. That is not allowed. For example, the code might look like

DECLARE
   SUBTYPE Weekday IS INTEGER NOT NULL;
   SUBTYPE Weekend IS Weekday NULL;  -- illegal

DECLARE
   SUBTYPE Weekday IS INTEGER NOT NULL;
   SUBTYPE Weekend IS Weekday;

Action:Revise the subtype definitions to eliminate the conflict.
PLS-00367 a RAISE statement with no exception name must be inside an exception handler

Cause:A RAISE statement not followed by an exception name was found outside an exception handler.
Action:Delete the RAISE statement, relocate it to an exception handler, or supply the missing exception name.
PLS-00368 in RAISE statement, name must be an exception name

Cause:The identifier in a RAISE statement is not a valid exception name.
Action:Make sure the identifier in the RAISE statement was declared as an exception and is correctly placed in the block structure. If you are using the name of a PL/SQL predefined exception, check its spelling.
PLS-00369 no choices may appear with choice OTHERS in an exception handler

Cause:A construct of the form

WHEN excep1 OR OTHERS =>

Action:Remove the identifier that appears with OTHERS or write a separate exception handler for that identifier.
PLS-00370 OTHERS handler must be last among the exception handlers of a block

Cause:One or more exception handlers appear after an OTHERS handler. However, the OTHERS handler must be the last handler in a block or subprogram because it acts as the handler for all exceptions not named specifically.
Action:Move the OTHERS handler so that it follows all specific exception handlers.
PLS-00371 at most one declaration for name is permitted in the declaration section

Cause:A reference to an identifier is ambiguous because there are conflicting declarations for it in the declarative part of a block, procedure, or function. At most one declaration of the identifier is permitted in a declarative part.
Action:Check the spelling of the identifier. If necessary, remove all but one declaration of the identifier.
PLS-00372 in a procedure, RETURN statement cannot contain an expression

Cause:In a procedure, a RETURN statement contains an expression, which is not allowed. In functions, a RETURN statement must contain an expression because its value is assigned to the function identifier. However, in procedures, a RETURN statement simply lets you exit before the normal end of the procedure is reached.
Action:Remove the expression from the RETURN statement, or redefine the procedure as a function.
PLS-00373 EXIT label name must label a LOOP statement

Cause:The label in an EXIT statement does not refer to a loop. An EXIT statement need not specify a label. However, if a label is specified (as in EXIT my_label), it must refer to a loop statement.
Action:Make sure the label name is spelled correctly and that it refers to a loop statement.
PLS-00374 illegal EXIT statement; it must appear inside the loop labeled name

Cause:An EXIT statement need not specify a label. However, if a label is specified (as in EXIT my_label), the EXIT statement must be inside the loop designated by that label.
Action:Make sure the label name is spelled correctly; if necessary, move the EXIT statement inside the loop to which the label refers.
PLS-00375 illegal GOTO statement; this GOTO cannot branch to label name

Cause:The line and column numbers accompanying the error message refer to a GOTO that branches from outside a construct (a loop or exception handler, for example) that contains a sequence of statements to a label inside that sequence of statements. Such a branch is not allowed.
Action:Either move the GOTO statement inside the sequence of statements or move the labeled statement outside the sequence of statements.
PLS-00376 illegal EXIT statement; it must appear inside a loop

Cause:An EXIT statement was found outside of a loop construct. The EXIT statement is used to exit prematurely from a loop and so must always appear within a loop.
Action:Either remove the EXIT statement or place it inside a loop.
PLS-00378 invalid compilation unit for this release of PL/SQL

Cause:A compilation unit is a file containing PL/SQL source code that is passed to the compiler. Only compilation units containing blocks, declarations, statements, and subprograms are allowed. This error occurs when some other language construct is passed to the compiler.
Action:Make sure the compilation unit contains only blocks, declarations, statements, and subprograms.
PLS-00379 CASE statements are not included in this release of PL/SQL

Cause:The unit being compiled contains a CASE statement. However, the current release of PL/SQL does not support CASE statements.
Action:Remove the CASE statement from the compilation unit.
PLS-00381 type mismatch found at name between column and variable in subquery or INSERT

Cause:The datatypes of a column and a variable do not match. The variable was encountered in a subquery or INSERT statement.
Action:Change the variable datatype to match that of the column.
PLS-00382 expression is of wrong type

Cause:An expression has the wrong datatype for the context in which it was found.
Action:Change the datatype of the expression. You might want to use datatype conversion functions.
PLS-00383 type mismatch found at name inside an IN or NOT IN clause

Cause:In a test for set membership such as X NOT IN (SELECT Y ... ), the expressions X and Y do not match in datatype, and it is unclear which implicit conversion is required to correct the mismatch.
Action:Change the expressions so that their datatypes match. You might want to use datatype conversion functions in the select list.
PLS-00384 type mismatch found at name in UPDATE's SET clause

Cause:The column to the left of the equal sign in the SET clause of an UPDATE statement does not match in datatype with the column, expression, or subquery to the right of the equal sign, and it is unclear which implicit conversion is required to correct the mismatch.
Action:Change the expressions so that their datatypes match. You might want to use datatype conversion functions in the SET clause.
PLS-00385 type mismatch found at name in SELECT...INTO statement

Cause:The expressions to the left and right of the INTO clause in a SELECT...INTO statement do not match in datatype, and it is unclear which implicit conversion is required to correct the mismatch.
Action:Change the expressions so that their datatypes match. You might want to use datatype conversion functions in the select list.
PLS-00386 type mismatch found at name between FETCH cursor and INTO variables

Cause:An assignment target in the INTO list of a FETCH statement does not match in datatype with the corresponding column in the select list of the cursor declaration, and it is unclear which implicit conversion is required to correct the mismatch.
Action:Change the cursor declaration or change the datatype of the assignment target. You might want to use datatype conversion functions in the select list of the query associated with the cursor.
PLS-00387 INTO variable cannot be a database object

Cause:An item in the INTO list of a FETCH or SELECT statement was found to be a database object. INTO introduces a list of user-defined variables to which output values are assigned. Therefore, database objects cannot appear in the INTO list.
Action:Check the spelling of the INTO list item. If necessary, remove the item from the INTO list or replace it with a user-defined output variable.
PLS-00388 undefined column name in subquery

Cause:A subquery contains a column name that was not defined for the specified table.
Action:Change the expression to specify a column that was defined.
PLS-00389 undefined column name in left-hand-side expression

Cause:A left-hand-side expression in a SQL statement refers to an undefined column.
Action:Check the spelling of the column name, then change the expression so that it refers only to defined columns.
PLS-00390 undefined column name in INSERT statement

Cause:An INSERT statement refers to a column not defined for the table or view into which data is being inserted.
Action:Check the spelling of the column name, then revise the statement so that it refers only to defined columns.
PLS-00391 undefined column name in UPDATE statement

Cause:An UPDATE statement refers to a column not defined for the table or view being updated.
Action:Check the spelling of the column name, then revise the statement so that it refers only to defined columns.
PLS-00392 type mismatch in arguments to BETWEEN

Cause:In a comparison such as X BETWEEN Y AND Z, the expressions X, Y, and Z do not match in datatype, and it is unclear which implicit conversion is required to correct the mismatch.
Action:Change the expressions so that their datatypes match. You might want to use datatype conversion functions.
PLS-00393 wrong number of columns in SELECT...INTO statement

Cause:The number of columns selected by a SELECT...INTO statement does not match the number of variables in the INTO clause.
Action:Change the number of columns in the select list or the number of variables in the INTO clause so that the numbers match.
PLS-00394 wrong number of values in the INTO list of a FETCH statement

Cause:The number of variables in the INTO clause of a FETCH statement does not match the number of columns in the cursor declaration.
Action:Change the number of variables in the INTO clause or the number of columns in the cursor declaration so that the numbers match.
PLS-00395 wrong number of values in VALUES clause of INSERT statement

Cause:The number of columns in an INSERT statement does not match the number of values in the VALUES clause. For example, the following statement is faulty because no column is specified for the value 20:

INSERT INTO emp (empno, ename) VALUES (7788, 'SCOTT', 20);

Action:Change the number of items in the column list or the number of items in the VALUES list so that the numbers match.
PLS-00396 INSERT statement's subquery yields wrong number of columns

Cause:The number of columns in an INSERT statement does not match the number of columns in a subquery select list. For example, the following statement is faulty because no corresponding column is specified for col3:

INSERT INTO emp (ename, empno) SELECT col1, col2, col3 FROM ...

Action:Change the number of items in the column list of the INSERT statement or the number of items in the select list so that the numbers match.
PLS-00397 type mismatch in arguments to IN

Cause:In a test for set membership such as X IN (Y, Z), the expressions X, Y, and Z do not match in datatype, and it is unclear which implicit conversion is required to correct the mismatch.
Action:Change the expressions so that their datatypes match. You might want to use datatype conversion functions.
PLS-00398 wrong number of columns in UNION, INTERSECT, or MINUS expression

Cause:The SELECT clauses to the left and right of a UNION, INTERSECT, or MINUS expression do not select the same number of columns. For example, the following statement is faulty because the select lists do not contain the same number of items:

CURSOR my_cur IS SELECT ename FROM emp
   INTERSECT SELECT ename, empno FROM emp;

Action:Change the select lists so that they contain the same number of items.
PLS-00399 different types of columns in UNION, INTERSECT, or MINUS expression

Cause:The select lists to the left and right of a UNION, INTERSECT, or MINUS expression select at least one column that is mismatched in datatype. For example, the following statement is faulty because the constant 3 has datatype NUMBER, whereas SYSDATE has datatype DATE:

CURSOR my_cur IS SELECT 3 FROM emp
   INTERSECT SELECT SYSDATE FROM emp;

Action:Change the select lists so that they match in datatype. You might want to use datatype conversion functions in the select list of one or more queries.
PLS-00400 different number of columns between cursor SELECT statement and return value

Cause:In a cursor declaration, a return type (such as RETURN emp%ROWTYPE) was specified, but the number of returned column values does not match the number of select-list items.
Action:Change the cursor return type or the select list so that the number of returned column values matches the number of select-list items.
PLS-00401 different column types between cursor SELECT statement and return value found at name

Cause:In a cursor declaration, a return type (such as RETURN emp%ROWTYPE) was specified, but a returned column value and its corresponding select-list item have different datatypes.
Action:Change the cursor return type or the select list so that each returned column value and its corresponding select-list item have the same datatype.
PLS-00402 alias required in SELECT list of cursor to avoid duplicate column names

Cause:A cursor was declared with a SELECT statement that contains duplicate column names. Such references are ambiguous.
Action:Replace the duplicate column name in the select list with an alias.
PLS-00403 expression str cannot be used as an INTO target of a SELECT/FETCH statement

Cause:A FETCH statement was unable to assign a value to an assignment target in its INTO list because the target is not a legally formed and declared variable. For example, the following assignment is illegal because 'Jones' is a character string, not a variable:

FETCH my_cur INTO 'Jones';

Action:Check the spelling and declaration of the assignment target. Make sure that the rules for forming variable names are followed.
PLS-00404 cursor name must be declared with FOR UPDATE to use with CURRENT OF

Cause:The use of the CURRENT OF cursor_name clause is legal only if cursor_name was declared with a FOR UPDATE clause.
Action:Add a FOR UPDATE clause to the definition of the cursor or do not use the CURRENT OF cursor_name clause.
PLS-00405 subquery not allowed in this context

Cause:A subquery was used in an inappropriate context, such as:

if (SELECT deptno FROM emp WHERE ... ) = 20 then ...

Action:The same result can be obtained by using a temporary variable, as in:
SELECT deptno INTO temp_var FROM emp WHERE ...;
IF temp_var = 20 THEN ...

PLS-00406 length of SELECT list in subquery must match number of assignment targets

Cause:A query select list is not the same length as the list of targets that will receive the returned values. For example, the following statement is faulty because the subquery returns two values for one target:

UPDATE emp SET ename =
   (SELECT ename, empno FROM emp WHERE ename = 'SMITH') ...

Action:Change one of the lists so that they contain the same number of items.
PLS-00407 '*' not allowed here; a list of columns is required

Cause:An asterisk (*) was used as an abbreviation for a list of column names. However, in this context the column names must be written out explicitly.
Action:Replace the asterisk with a list of column names.
PLS-00408 duplicate column name not permitted in INSERT or UPDATE

Cause:An UPDATE or INSERT statement has a column list that contains duplicate column names.
Action:Check the spelling of the column names, then eliminate the duplication.
PLS-00409 duplicate variable name in INTO list is not permitted

Cause:The same variable appears twice in the INTO list of a SELECT or FETCH statement.
Action:Remove one of the variables from the INTO list.
PLS-00410 duplicate fields in record or table are not permitted

Cause:When a user-defined record was declared, the same name was given to two fields. Like column names in a database table, field names in a user-defined record must be unique.
Action:Check the spelling of the field names, then remove the duplicate.
PLS-00411 number of values in aggregate and in subquery don't match

Cause:In a statement of the form aggregate = subquery, the numbers of values in the aggregate and subquery are unequal. For example, the code might look like

... WHERE (10,20,30) = (SELECT empno,deptno FROM emp WHERE...);

Action:Revise the aggregate or subquery so that the numbers of values match.
PLS-00412 list of values not allowed as argument to this function or procedure

Cause:A parenthesized list of values separated by commas (that is, an aggregate) was used in the wrong context. For example, the following usage is invalid:

WHERE (col1, col2) > (SELECT col3, col4 FROM my_table ...)

WHERE (col1, col2) = (SELECT col3, col4 FROM my_table ...)

Action:Rewrite the expression. For example, the clause

WHERE (col1, col2) > (SELECT col3, col4 FROM my_table ...)

WHERE col1 > (SELECT col3 FROM my_table ...) AND
   col2 > (SELECT col4 FROM my_table ...)

PLS-00413 identifier in CURRENT OF clause is not a cursor name

Cause:The identifier in a CURRENT OF clause names an object other than a cursor.
Action:Check the spelling of the identifier. Make sure that it names the cursor in the DELETE or UPDATE statement and that it names the cursor itself, not a FOR-loop variable.
PLS-00414 no column name in table

Cause:A table name or alias was used to qualify a column reference, but the column was not found in that table. Either the column was never defined or the column name is misspelled.
Action:Confirm that the column was defined and check the spelling of the column name.
PLS-00417 table or view or column does not exist

Cause:A database table, view, or column was specified in a SQL statement that does not exist, or the privileges required to access the table or view were not granted.
Action:Check the spelling of the table (or view) and column names; make sure the table and columns exist. If necessary, ask the DBA to grant the privileges required to access the table.
PLS-00418 array bind type must match PL/SQL table row type

Cause:A host array was passed (by an Oracle Precompiler program, for example) to a PL/SQL subprogram for binding to a PL/SQL table parameter. However, the datatypes of the array elements and PL/SQL table rows are incompatible. So, the binding failed.
Action:Change the datatype of the array elements or PL/SQL table rows to make the datatypes compatible.
PLS-00419 reference to remote attribute not permitted

Cause:An attempt was made to reference a remote cursor attribute, which is not allowed. For example, the code might look like

IF SQL%NOTFOUND@newyork THEN ...

Action:Do not try to reference a remote cursor attribute.
PLS-00420 cannot call built-in routines remotely

Cause:An attempt was made to call a built-in PL/SQL function remotely, which is not allowed. For example, the code might look like

my_sqlerrm := SQLERRM@newyork;

INSERT INTO emp VALUES (my_empno, STANDARD.RTRIM@newyork(my_ename), ...);

Action:Always call built-in functions locally; never specify a database link.
PLS-00421 synonym definitions nested too deeply; possible loop in synonyms

Cause:Directly or indirectly, a synonym was defined in terms of itself, creating a circular definition. Or, a chain of synonyms, too long for the PL/SQL compiler to handle, was defined.
Action:Redefine the synonyms to eliminate the circular definition. If necessary, shorten the chain of synonyms.
PLS-00422 no PL/SQL translation for the bind type given for this bind variable

Cause:A host variable was passed (by an Oracle Precompiler program, for example) to PL/SQL for binding. However, its datatype is not compatible with any PL/SQL datatype. So, the binding failed.
Action:Change the datatype of the host variable to make it compatible with a PL/SQL datatype.
PLS-00423 ORDER BY item must be the number of a SELECT-list expression

Cause:A column alias was used in the ORDER BY clause of a SELECT statement that uses a UNION, INTERSECT, or MINUS set operator. This is not allowed. In such cases, expressions in the ORDER BY clause must be unsigned integers that designate the ordinal positions of select-list items.
Action:Change the alias in the ORDER BY clause to an unsigned integer that designates the ordinal position of the select item in question.
PLS-00424 RPC defaults cannot include package state

Cause:An attempt was made to call a remote subprogram whose defaulted parameters depend on package state, which is not allowed. When calling remote subprograms, the actual parameters must be passed explicitly if the corresponding formal parameters depend on package state.
Action:Call the remote subprogram by passing each actual parameter explicitly.
PLS-00425 in SQL, function argument and return type must be SQL type

Cause:When a stored function was called from a SQL statement, parameters of the wrong type were passed. To be callable from SQL statements, a stored function must meet several requirements, one of which is that its arguments have SQL datatypes such as CHAR, DATE, or NUMBER. None of the arguments can have non-SQL types such as BOOLEAN, TABLE, or RECORD.
Action:Make sure all the arguments in the function call have SQL datatypes.
PLS-00426 cursor variable OUT parameter 'name' cannot be FETCH'ed or CLOSE'd

Cause:When a cursor variable was declared as the formal parameter of a subprogram that will FETCH from and/or CLOSE the cursor variable, the OUT parameter mode was specified. This is not allowed. In such cases, the IN or IN OUT mode must be specified.
Action:Change the parameter mode from OUT to IN or IN OUT.
PLS-00428 an INTO clause is expected in this SELECT statement

Cause:The INTO clause of a SELECT INTO statement was omitted. For example, the code might look like

SELECT deptno, dname, loc FROM dept WHERE ...

SELECT deptno, dname, loc INTO dept_rec FROM dept WHERE ...

Action:Add the required INTO clause.
PLS-00450 a variable of this private type cannot be declared here

Not in Release 2.3.

PLS-00451 remote types not allowed

Cause:When a constant or variable was declared, a datatype that is defined in a remote library unit was specified. This is not allowed.
Action:Do not specify the datatype unless it is defined locally.
PLS-00452 subprogram name violates its associated pragma

Cause:A packaged function cannot be called from SQL statements unless its purity level is asserted by coding a RESTRICT_REFERENCES pragma in the package specification. The pragma, which is used to control side effects, tells the PL/SQL compiler to deny the packaged function read/write access to database tables, public packaged variables, or both. A SQL statement that violates the pragma will cause a compilation error.
Action:Raise the purity level of the function, or relax the pragma restrictions.
PLS-00483 exception name may appear in at most one exception handler in this block

Cause:An exception appears in two different WHEN clauses (that is, two different exception handlers) in the exception-handling part of a PL/SQL block or subprogram.
Action:Remove one of the references to the exception.
PLS-00484 redundant exceptions name and name must appear in same exception handler

Cause:Using the EXCEPTION_INIT pragma, different exceptions were initialized to the same Oracle error number; then, they were referenced in different exception handlers within the same exception-handling part. Such references conflict.
Action:Remove one of the exceptions or initialize it to a different Oracle error number.
PLS-00485 in exception handler, name must be an exception name

Cause:An identifier not declared as an exception appears in an exception handler WHEN clause. Only the name of an exception is valid in a WHEN clause.
Action:Check the spelling of the exception name and make sure the exception was declared properly.
PLS-00486 SELECT list cannot be enclosed in parentheses

Cause:In a SELECT statement, the select list was enclosed in parentheses, as in:

SELECT (deptno, dname, loc) FROM dept INTO ...

Action:Remove the parentheses enclosing the select list.
PLS-00487 invalid reference to variable name

Cause:A variable was referenced in a way that is inconsistent with its datatype. For example, a scalar variable might have been mistakenly referenced as a record, as follows:

DECLARE
   CURSOR emp_cur IS SELECT empno, ename, sal FROM emp;
   emp_rec emp_cur%ROWTYPE;
   my_sal  NUMBER(7,2);
BEGIN    ...    total_sal := total_sal + my_sal.sal;  -- invalid
   ...

Action:Check the spelling of the variable name. Make sure the variable was declared properly and that the declaration and reference are consistent regarding datatype.
PLS-00488 invalid variable declaration: object name must be a type or subtype

Cause:The datatype specifier in a variable declaration does not designate a legal type. For example, the %TYPE attribute might not have been added to a declaration, as in

DECLARE
   my_sal   emp.sal%TYPE;
   my_ename emp.ename;    -- missing %TYPE
   ...

Action:Make sure the datatype specifier designates a legal type. Remember to use the %TYPE and %ROWTYPE attributes when necessary.
PLS-00489 invalid table reference: name must be a column in this expression

Cause:In a query, a select-list item refers to a table in the FROM clause but not to a database column.
Action:Check the spelling of the column names, make sure each column in the select list refers to a table in the FROM clause, then re-execute the query.
PLS-00490 illegal statement

Cause:A constant, variable, function call, or incomplete statement was used where a statement was expected. For example, instead of calling a function from an expression, it might have been called as a statement (as if it were a procedure).
Action:Check the statement, making sure that its commands, identifiers, operators, delimiters, and terminator form a complete and valid PL/SQL statement.
PLS-00491 numeric literal required

Cause:A constant or variable was used where a numeric literal is required. For example, the code might look like

my_ename  VARCHAR2(max_len);

my_ename  VARCHAR2(15);

Action:Replace the identifier with a numeric literal.
PLS-00503 RETURN <value> statement required for this return from function

Cause:In a function body, a RETURN statement was used that contains no expression. In procedures, a RETURN statement contains no expression because the statement simply returns control to the caller. However, in functions, a RETURN statement must contain an expression because its value is assigned to the function identifier.
Action:Add an expression to the RETURN statement.
PLS-00504 type name_BASE may not be used outside of package STANDARD

Cause:In a declaration, the datatype NUMBER_BASE (for example) was mistakenly specified. The datatypes CHAR_BASE, DATE_BASE, MLSLABEL_BASE, and NUMBER_BASE are for internal use only.
Action:Specify (for example) the datatype NUMBER instead of NUMBER_BASE.
PLS-00505 user-defined types may only be defined as PL/SQL tables or records

Cause:An attempt was made to define a type other than TABLE or RECORD, but these are the only user-defined types allowed in this release of PL/SQL. For example, the following type definition is illegal:

TYPE Byte IS INTEGER(2);  -- illegal

Action:Remove the type definition, or revise it to specify a TABLE or RECORD type.
PLS-00506 user-defined constrained subtypes are disallowed

Cause:An attempt was made to define a constrained subtype, but only unconstrained subtypes are allowed in this release of PL/SQL. For example, the following type definition is illegal:

SUBTYPE Acronym IS VARCHAR2(5);  -- illegal

Action:Remove the illegal type constraint.
PLS-00507 a PL/SQL table may not contain a table or record with composite fields

Cause:In a TABLE type definition, a nested record type was specified as the element type. This is not allowed. All fields in the record must be scalars.
Action:Remove the TABLE type definition, or replace the nested record type with a simple record type.
PLS-00508 the expression in a RETURN statement cannot be a type

Cause:A datatype specifier was used instead of an expression in the RETURN statement of a user-defined function, as shown in the example below. Do not confuse the RETURN statement, which sets the function identifier to the result value, with the RETURN clause, which specifies the datatype of the result value.

FUNCTION credit-rating (acct_no NUMBER) RETURN BOOLEAN IS 
   BEGIN
      ...
      RETURN NUMBER;  -- should be an expression
   END;

Action:Replace the datatype specifier in the RETURN statement with an appropriate expression.
PLS-00509 implementation restriction: pass a returned record to a temporary identifier before selecting a field

Cause:Illegal syntax was used to call a parameter-less function that returns a record or a PL/SQL table of records. When calling a function that takes parameters and returns a record, you use the following syntax to reference fields in the record:

function_name(parameters).field_name

function_name().field_name  -- illegal; empty parameter list

function_name.field_name  -- illegal; no parameter list

Action:Declare a local record or PL/SQL table of records to which you can assign the function result, then reference its fields directly.
PLS-00510 FLOAT cannot have scale

Cause:When a FLOAT variable was declared, its precision and scale were specified, as shown in the following example:

DECLARE
   Salary FLOAT(7,2);

   salary FLOAT(7);

Action:Remove the scale specifier from the declaration, or declare a NUMBER variable instead.
PLS-00511 a record may not contain a PL/SQL table of records

Cause:In a RECORD definition, one of the fields was declared as a PL/SQL table of records. This is not allowed. A record can be the component of another record (that is, records can be nested), but a PL/SQL table of records cannot be the component of a record.
Action:Remove the field declaration, or revise it to specify a simple record type.
PLS-00512 implementation restriction: 'name' cannot directly access remote package variable or cursor

Cause:An attempt was made to reference a remote packaged variable or cursor. This is not allowed. Instead, add to the remote package a function that returns the value of the variable or cursor.
Action:Remove the illegal reference.
PLS-00700 PRAGMA EXCEPTION_INIT of name must follow declaration of its exception in same block

Cause:An EXCEPTION_INIT pragma was not declared in the same block as its exception. They must be declared in the proper order in the same block, with the pragma declaration following the exception declaration.
Action:Place the EXCEPTION_INIT pragma directly after the exception declaration referenced by the pragma.
PLS-00701 illegal Oracle error number num for PRAGMA EXCEPTION_INIT

Cause:The error number passed to an EXCEPTION_INIT pragma was out of range. The error number must be in the range -9999 .. -1 (excluding -100) for Oracle errors or in the range -20000 .. -20999 for user-defined errors.
Action:Use a valid error number.
PLS-00702 second argument to PRAGMA EXCEPTION_INIT must be a numeric literal

Cause:The second argument passed to an EXCEPTION_INIT pragma was something other than a numeric literal (a variable, for example). The second argument must be a numeric literal in the range -9999 .. -1 (excluding -100) for Oracle errors or in the range -20000 .. -20999 for user-defined errors.
Action:Replace the second argument with a valid error number.
PLS-00703 multiple instances of named argument in list

Cause:Two or more actual parameters in a subprogram call refer to the same formal parameter.
Action:Remove the duplicate actual parameter.
PLS-00704 name must be declared as an exception

Cause:The exception_name parameter passed to an EXCEPTION_INIT pragma is misspelled or does not refer to a legally declared exception. Or, the pragma is misplaced; it must appear in the same declarative section, somewhere after the exception declaration.
Action:Check the spelling of the exception_name parameter. Then, check the exception declaration, making sure the exception name and the keyword EXCEPTION are spelled correctly. Also make sure the pragma appears in the same declarative section somewhere after the exception declaration.
PLS-00705 exception name used in expression requiring return type

Cause:An exception was referred to in an expression. Exceptions have names but not values and therefore cannot contribute values to an expression. For example, the following RETURN statement is illegal:

FUNCTION credit_limit (cust_no INTEGER) RETURN NUMBER IS
   limit       NUMBER;
   over_limit  EXCEPTION;
   ...
BEGIN
   ...
   RETURN over_limit;  -- illegal
END;

Action:Check the spelling of the identifiers in the expression, then rewrite the expression so that it does not refer to an exception.
PLS-00706 exception name cannot be used as prefix of a selected component

Cause:An exception name was mistakenly used to qualify a reference to a component. For example, when dot notation was used to specify fields within a record, an exception name might have been coded instead of the record name.
Action:Rewrite the component reference using a valid prefix (for example, the name of a package, record, or schema).
PLS-00707 unsupported construct or internal error [num]

Cause:At run time, this is an internal error. At compile time, it indicates one of the following problems:
· A call was made to a remote subprogram that has a parameter type or default expression not supported at the calling site.

· An incomplete upgrade or downgrade was done to a database that has stored procedures. Perhaps incorrect versions of system packages such as STANDARD.SQL were installed.

· A compiler bug was encountered. In such cases, legal PL/SQL syntax will fail to compile.

Action:Either report the internal error to your Customer Support representative or, depending on the problem, take one of the following actions:
· Revise the logic of the application to use parameter types and default expressions that are supported at both the local and remote sites.

· Complete the upgrade or downgrade properly, making sure to install correct versions of all system packages.

· Report the legal-syntax error to your Customer Support representative. If there are line and column numbers displayed with the error message, they might help you find a workaround. For example, try recoding the offending line to avoid the bug.

PLS-00708 pragma name must be declared in a package specification

Cause:The named pragma was not declared in a package specification, as required. For example, the pragma RESTRICT_REFERENCES must be declared in a package specification.
Action:Remove or relocate the misplaced pragma.
PLS-00801 internal error [num]

Cause:This is a generic internal error that might occur during compilation or execution. The first parameter is the internal error number.
Action:Report this error as a bug to your Customer Support representative.
PLS-00900 can't find body of unit name

Cause:At run time, the body of a program unit could not be found. This might have happened, for example, if a procedure that has a specification but no body was referenced. (No compile-time errors were generated because the specification exists.)
Action:Define a body for the program unit.
PLS-00901 the datatype of column name of table name is not supported

Cause:A column in a database table belongs to a datatype that is not supported by the current release of PL/SQL.
Action:Remove the offending column from the table or copy the desired columns to another table.
PLS-00902 a read-only bind variable used in OUT or IN OUT context

Cause:A host variable that is protected from update was used in a context that allows an update.
Action:Check the context and change the use of the host variable, or assign the value of the host variable to a PL/SQL local variable, then use the local variable instead.
PLS-00904 insufficient privilege to access object name

Cause:An attempt was made to operate on a database object without the required privilege. This error occurs, for example, if an attempt was made to UPDATE a table for which only SELECT privileges were granted.
Action:Ask the DBA to perform the operation or to grant you the required privilege.
PLS-00905 object name is invalid

Cause:An invalid package specification or stored subprogram was referenced. A package specification or stored subprogram is invalid if its source code or any database object it references has been DROPped, REPLACEd, or ALTERed since it was last compiled.
Action:Find out what invalidated the package specification or stored subprogram, then make sure that Oracle can recompile it without errors.
PLS-00906 compilation is not possible

Cause:The PL/SQL compiler cannot run properly because its operating environment is corrupted. For example, its error message file might be inaccessible.
Action:Check the PL/SQL operating environment, making sure that all files required by the compiler are accessible.
PLS-00950 in this version, PL/SQL tables cannot be used in this SQL statement

Cause:In a SQL statement, a PL/SQL table was referenced incorrectly. For example, the following reference might have been made, but PL/SQL table attributes can only be used in procedural statements:
SELECT ename_tab.COUNT INTO name_count WHERE ...

Action:Remove the incorrect reference from the SQL statement.
PLS-00990 PL/SQL tables of cursor variables are not allowed

Cause:An attempt was made to use a REF CURSOR type to define a TABLE type, which is not allowed. The rows in a PL/SQL table cannot store the values of cursor variables.
Action:Redefine the TABLE type using one of the PL/SQL scalar datatypes (such as CHAR, DATE, or NUMBER) to specify its column type.
PLS-00993 cursor variables cannot be passed as RPC arguments or results

Cause:An attempt was made to pass a cursor variable to or from a remote subprogram, which is not allowed. For example, a remote procedure cannot be used to open a cursor variable because remote subprograms cannot return the values of cursor variables.
Action:Change the subprogram call to reference a local database.
PLS-00994 cursor variables cannot be declared as part of a package

Cause:An attempt was made to declare a cursor variable in a package specification, which is not allowed. Although REF CURSOR types can be defined in a PL/SQL block, subprogram, or package, cursor variables can be declared only in a block or subprogram.
Action:Move the cursor variable declaration into a PL/SQL block or subprogram.
PLS-00995 unhandled exception # num

Cause:An exception was raised for which no handler was found. If it cannot find a handler for a raised exception, PL/SQL returns an unhandled exception to the host environment. The number embedded in the message is an Oracle error code listed in this manual.
Action:Fix the condition that raised the exception, write an appropriate exception handler, or use the OTHERS handler. If there is an appropriate handler in the current block, the exception was raised in a declaration or exception handler, and therefore propagated immediately to the enclosing block.
PLS-00996 out of memory

Cause:A request from PL/SQL for more memory failed.
Action:Make sure that you are not referencing the wrong row in a PL/SQL table and that the program is not recursing too deeply.


Contents Index Home Previous Next