| PLS-00400 | 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 | PLS-00401: different column types between cursor SELECT statement and return value found at "string" |
| 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 | 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 | PLS-00403: expression "string" 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 | PLS-00404: cursor "string" 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 | 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 ... Subqueries are allowed only in SQL statements. |
| 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 | 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 | 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 | PLS-00408: duplicate column "string" 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 | PLS-00409: duplicate variable "string" 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 | PLS-00410: duplicate fields in RECORD,TABLE or argument list 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 | 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 | 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 ...) However, an equal sign can take a list of values and a subquery as left- and right-hand-side arguments, respectively. So, the following usage is valid: 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 ...) can be rewritten as WHERE col1 > (SELECT col3 FROM my_table ...) AND col2 > (SELECT col4 FROM my_table ...) |
| PLS-00413 | 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 | PLS-00414: no column "string" 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-00415 | PLS-00415: "string" is an OUT parameter and cannot appear in a function |
| Cause | An OUT or IN OUT formal parameter was used in a function specification. |
| Action | none |
| PLS-00416 | PLS-00416: The third argument of DECODE cannot be NULL |
| Cause | The third argument of DECODE is NULL. |
| Action | Enter an argument with a proper type and value. |
| PLS-00417 | PLS-00417: unable to resolve "string" as a column |
| 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 | 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 | 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 | PLS-00420: can"t call builtin 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; or 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 | PLS-00421: circular synonym "string" |
| Cause | Directly or indirectly, a synonym was defined in terms of itself, creating a circular definition. |
| Action | Redefine the synonyms to eliminate the circular definition. |
| PLS-00422 | PLS-00422: no PL/SQL translation for the bindtype 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 | 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 | 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 | PLS-00425: in SQL, function argument and return types must be SQL type |
| Cause | When a cursor variable was declared as the formal parameter of a |
| Action | Change the parameter mode from OUT to IN or IN OUT. |
| PLS-00427 | PLS-00427: RPC defaults cannot use builtins when versions of STANDARD differ |
| Cause | An attempt was made to call a remote subprogram whose defaulted parameter value is calculated using a builtin operation. If the calling system uses a different version of package STANDARD than does the called system, a defaulted expression must be either a simple numeric or string literal, NULL, or a direct call to a user-written function. |
| Action | Call the remote subprogram by passing each actual parameter value explicitly. |
| PLS-00428 | 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 ... instead of SELECT deptno, dname, loc INTO dept_rec FROM dept WHERE ... In PL/SQL, only a subquery is written without an INTO clause. |
| Action | Add the required INTO clause. |
| PLS-00429 | PLS-00429: unsupported feature with RETURNING clause |
| Cause |
Cause: - INTO clause and RETURNING clause cannot be use in the same statement. - RETURNING clause is currently not supported for object type columns, LONG columns, records, %rowtypes, remote tables and INSERT with subquery. This is as ORA-28815. |
| Action | Use separate select statement to get the values. |
| PLS-00430 | PLS-00430: FORALL iteration variable string is not allowed in this context |
| Cause | FORALL iteration variable can only be used as a subscript. It cannot be used directly or as a part of an expression. |
| Action | Use FORALL variable only as a collection subscript. |
| PLS-00431 | PLS-00431: bulk SQL attributes must use a single index |
| Cause | More than one index specified to access SQL bulk attribute. |
| Action | Use a single index of integer datatype. |
| PLS-00432 | PLS-00432: implementation restriction: cannot use FORALL and BULK COLLECT INTO together in SELECT statements |
| Cause | SELECT statement contains both the FORALL and BULK COLLECT INTO phrases. |
| Action | Dn not use FORALL and BULK COLLECT INTO together in SELECT statements. |
| PLS-00433 | PLS-00433: inconsistent package STANDARD |
| Cause | PL/SQL compiler could not find the entries (such as type declarations) that should exist in the package STANDARD. |
| Action | Make sure that the correct version of package STANDARD is available in the current Oracle database, then retry compilation. |
| PLS-00434 | PLS-00434: record field has unsupported type: "string" |
| Cause | An attempt was made to use an unsupported type for a record field. In this release, the use of the SQL92 datetime types (time, timestamp, time with time zone, timestamp with time zone, interval year to month, interval day to second) are not supported in record fields. |
| Action | Use only supported types for record fields. |
| PLS-00435 | PLS-00435: DML statement without BULK In-BIND cannot be used inside FORALL |
| Cause | The DML (SELECT/INSERT/DELETE/UPDATE) statement inside the FORALL statement does not contain BULK IN-BIND variables. |
| Action | The DML (SELECT/INSERT/DELETE/UPDATE) statement inside the FORALL statement must contain BULK IN-BIND variables. |
| PLS-00436 | PLS-00436: implementation restriction: cannot reference fields of BULK In-BIND table of records |
| Cause | table(bulk_index).field is not supported at run-time yet. |
| Action | Use FOR loop with plain FORALL DML statement (SELECT/INSERT/DELETE/UPDATE) instead |
| PLS-00437 | PLS-00437: FORALL bulk index cannot be used in string clause |
| Cause | RETURNING table(bulk_index) is not supported. |
| Action | Use RETURNING BULK COLLECT instead |
| PLS-00438 | PLS-00438: value in LIMIT clause: "string" use is invalid |
| Cause | The evaluation value in the LIMIT clause of a bulk fetch was found in an inappropriate context. For example, the following statement is illegal because the LIMIT clause in a bulk fetch expects a numeric value. FETCH c1 BULK COLLECT INTO var_tab LIMIT "22333"; -- illegal |
| Action | Change the expression of the LIMIT clause so that the evaluation result is compatible to a numeric value. |
| PLS-00439 | PLS-00439: A LIMIT clause must be used within a BULK FETCH |
| Cause | A LIMIT clause is used within a non-bulk fetch |
| Action | Do not use a LIMIT clause when a non-bulk fetch is used. |
| PLS-00450 | PLS-00450: a variable of this private type cannot be declared here |
| Cause | A variable declaration uses a type that is declared PRIVATE in some other compilation unit. |
| Action | Do not use this type in a PRIVATE variable declaration. |
| PLS-00452 | PLS-00452: Subprogram "string" 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-00453 | PLS-00453: remote operations not permitted on object tables or user-defined type columns |
| Cause | A reference to a remote object tables or user-defined type column was found. |
| Action | Do not refer to it. |
| PLS-00454 | PLS-00454: with a returning into clause, the table expression cannot be remote or a subquery |
| Cause | A reference to a remote table or subquery was found in a sql statement with a returning into clause. |
| Action | Do not refer to it, or do use a subsequent select statement. |
| PLS-00455 | PLS-00455: cursor "string" cannot be used in dynamic SQL OPEN statement |
| Cause | dynamicly OPEN a REF CURSOR that has RETURN type. However, only REF CURSOR without RETURN type can be OPEN"ed by an embebded dynamic OPEN statement. |
| Action | define a REF CURSOR without return type, and use it in the statement. |
| PLS-00456 | PLS-00456: item "string" is not a cursor |
| Cause | the given variable is not a cursor and therefore cannot be OPEN"ed or FETCH"ed from. |
| Action | check the spelling and declaration for the given variable. |
| PLS-00457 | PLS-00457: expressions have to be of SQL types |
| Cause | an expression of wrong type is in USING or dynamic RETURNING clause. In USING or dynamic RETURNING clause, an expression cannot be of non-SQL types such as BOOLEAN, INDEX TABLE, and record. |
| Action | change the expression type to a SQL type. |
| PLS-00458 | PLS-00458: subprogram "string" cannot be called from a REPEATABLE subprogram |
| Cause | The subprogram is not REPEATABLE and cannot be called from a REPEATABLE subprogram. |
| Action | delete the call or delete REPEATABLE. |
| PLS-00459 | PLS-00459: this feature is not allowed in REPEATABLE subprogram |
| Cause | Having one of the followings feature in the REPEATABLE subprogram: dynamic SQL statements or autonomous transaction. |
| Action | delete the statements or delete REPEATABLE. |
| PLS-00460 | PLS-00460: REPEATABLE subprogram "string" has to be RNDS, WNDS, RNPS, and WNPS |
| Cause | Repeatable subprogram can neither read database state (RNDS), write database state (WNDS), read package state (RNPS), nor write package state (WNPS). |
| Action | make the subprogram to be RNDS, WNDS, RNPS, and WNPS or delete REPEATABLE |
| PLS-00461 | PLS-00461: mismatch REPEATABLE information between specification and body of "string" |
| Cause | REPEATABLE is declared at the subprogram"s specification, but not at its body, or vice versa. |
| Action | make sure both specification and body are declared as REPEATABLE |
| PLS-00462 | PLS-00462: nested subprogram "string" has to be REPEATABLE |
| Cause | the nested subprogram of a REPEATABLE subprogram is not declared as REPEATABLE. If a subprogram is REPEATABLE, all of its nested subprograms has to be declared as REPEATABLE. |
| Action | declared the nested subprogram as REPEATABLE |
| PLS-00483 | PLS-00483: exception "string" 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 | PLS-00484: redundant exceptions "string" and "string" 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 | PLS-00485: in exception handler, "string" 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 | 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 ... This breaks the rules of SQL syntax. Parentheses are not required because the keywords SELECT and FROM delimit the select list. |
| Action | Remove the parentheses enclosing the select list. |
| PLS-00487 | PLS-00487: Invalid reference to variable "string" |
| 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 | PLS-00488: invalid variable declaration: object "string" 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 ... When declaring a constant or variable, to provide the datatype of a column automatically, use the %TYPE attribute. Likewise, when declaring a record, to provide the datatypes of a row automatically, use the %ROWTYPE attribute. |
| Action | Make sure the datatype specifier designates a legal type. Remember to use the %TYPE and %ROWTYPE attributes when necessary. |
| PLS-00489 | PLS-00489: invalid table reference: "string" 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 | 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 | 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); instead of my_ename VARCHAR2(15); When specifying the maximum length of a VARCHAR2 variable, an integer literal must be used. |
| Action | Replace the identifier with a numeric literal. |
| PLS-00492 | PLS-00492: variable or constant initialization may not refer to functions declared in the same package |
| Cause | If a package spec p declares a function f, that function may not be used in any variable declarations in that same package spec. This is because of a circular instantiation problem: in order to fully instantiate the package spec, the variable must be initialized. To initialize the variable, the function body code in the package body must be executed. That requires that the package body be instantiated. However, the package body cannot be instantiated until the package spec is fully instantiated. |
| Action | Remove the reference to the function from the variable initialization. A technique which often works is to move the variable initialization from the variable declaration (in the package spec) to the package body initialization block. |
| PLS-00493 | PLS-00493: invalid reference to a server-side object or function in a local context |
| Cause | A reference to a server-side object (e.g. a table column) or function (a group function such as SUM, AVG, MIN, MAX, ... ) was found in a context where only PL/SQL objects may be present (such as within the parameter list of a local function or as the index of a (local) PL/SQL table.) |
| Action | Rewrite the offending statement; or (if a local function call is the problem context), make the function non-local (either packaged or top- level.) |
| PLS-00494 | PLS-00494: coercion into multiple record targets not supported |
| Cause | The INTO list of a SELECT or FETCH specified more than a single record- type target and the column types required coercion into a record to match the INTO list. This is type checked as correct, but not yet supported. |
| Action | Create a new record type to hold all of the column types or code the SELECT with an INTO target for every source column. |
| PLS-00495 | PLS-00495: too many columns in SELECT...INTO statement after bursting record targets |
| Cause | Type checking indicated the columns in a SELECT or FETCH were being collected into a record in the INTO list. The record was burst into its fields. There were not enough fields in the record for each of the columns. |
| Action | Change the number of columns or the record variable(s) in the INTO clause so that they match. |
| PLS-00496 | PLS-00496: too few columns in SELECT...INTO statement after bursting record targets |
| Cause | Type checking indicated the columns in a SELECT or FETCH were being collected into a record in the INTO list. The record was burst into its fields. There were not enough columns to fill all of the fields in the record. |
| Action | Change the number of columns or the record variable(s) in the INTO clause so that they match. |
| PLS-00497 | PLS-00497: cannot mix between single row and multi-row (BULK) in INTO list |
| Cause |
- When BULK syntax (e.g. BULK COLLECT INTO) is used to retrieve data, every variable in the INTO list has to be of type that is a collection of the type of the corresponding column. - When BULK is NOT used, every variable in the INTO list has to be of compatible type with the corresponding column. |
| Action | Change the INTO list so that all variables have correct data types |
| PLS-00498 | PLS-00498: illegal use of a type before its declaration |
| Cause | A variable or constant was declared to be of a type whose declaration appears later in the compilation unit; or, a type or subtype was declared in terms of another type whose declaration appears later in the compilation unit. |
| Action | Ensure that the type declaration preceeds its use in the variable/ constant/type declaration. |
| PLS-00499 | PLS-00499: coercion into collection of records not supported |
| Cause | A SELECT or FETCH may specify a column list to be coerced into a variable which is a collection of records. This is type checked as correct, but not yet supported because of the implicit layout change required. |
| Action | Express the SELECT with an object constructor around the columns and use a collection of objects as an INTO variable. Or, build the collection one row at a time coercing each row into a record which happens to be an element. Or, use a record of collections. |
| PLS-00500 | PLS-00500: invalid operator binding |
| Cause | An operator binding fucntion cannot be found in the specified scope. |
| Action | Provide the correct number and types of parameters for the operator binding fucntion. Or, specify the correct names for schema, package, or type containing the operator binding fucntion. |
| PLS-00503 | 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 | PLS-00504: type string_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 | PLS-00505: User Defined Types may only be defined as PLSQL 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 | 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 | PLS-00507: a PLSQL Table may not contain a table or a 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 | 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 | 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 However, you cannot use the syntax above to call a parameter-less function because PL/SQL does not allow empty parameter lists. That is, the following syntax is illegal: function_name().field_name -- illegal; empty parameter list You cannot just drop the empty parameter list because the following syntax is also illegal: 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 | 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); However, a scale for FLOAT variables cannot be specified; only a precision can be specified, as in salary FLOAT(7); |
| Action | Remove the scale specifier from the declaration, or declare a NUMBER variable instead. |
| PLS-00511 | PLS-00511: a record may not contain a PL/SQL table of records |
| Cause | n 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 | PLS-00512: Implementation Restriction: "string": 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-00513 | PLS-00513: PL/SQL function called from SQL must return value of legal SQL type |
| Cause | In a SQL statement, do not call a PL/SQL function having a return type that can not be handled by SQL. For example, type BOOLIAN, records and indexed-tables are not supported by SQL and functions returneing such values can not be called from SQL. |
| Action | none |
| PLS-00514 | PLS-00514: INSERT statement with REF INTO clause requires a typed table |
| Cause | This INSERT statement provides REF INTO clause, which is only legal when the table specified in the INTO clause is an object table. |
| Action | none |
| PLS-00515 | PLS-00515: The type of the REF INTO variable "string" must be REF to the table"s type |
| Cause | In INSERT statement with REF INTO clause, the type of the data item must be REF to the type of the table used in INTO clause. |
| Action | none |
| PLS-00516 | PLS-00516: Type mismatch between object table and value "string" in INSERT statement. |
| Cause | In the INSERT statement operating on typed tables (tables of objects), the type of a non-aggregate value did not match the object type of the table. |
| Action | none |
| PLS-00517 | PLS-00517: Type mismatch between a select list element "string" and corresponding table column in INSERT statement with a subquery |
| Cause | In an INSERT statement with subquery, at lease one of the elements of the select list was not type-compatible with the corresponding column of the table in the INTO clause. This error indicates that the subquery should be rewritten to match the structure of the target table. |
| Action | none |
| PLS-00518 | PLS-00518: This INSERT statement requires VALUES clause containing a parenthesised list of values |
| Cause | A VALUES clause was entered without a list of SQL data items in parentheses. In all INSERT statements with an explicit column list, the VALUES clause must contain a list of SQL data items in parentheses. For example: INSERT INTO my_tab (a,b,c) VALUES (1,2,my_variable); |
| Action | Rewrite the statement to include a list of SQL data items in parentheses. |
| PLS-00519 | PLS-00519: This INSERT statement requires a VALUES clause containing an object type expression, not a list of values |
| Cause | In an INSERT statement with typed tables, an aggregate was used when an object type item was expected. |
| Action | Replace the aggregate with an object constructor or other object type expression. |
| PLS-00520 | PLS-00520: MAP methods must be declared without any parameters other than (optional) SELF. |
| Cause | A MAP member function was declared with a parameter. Map member functions can have only one parameter: the default SELF parameter. Map methods must be declared without any parameters. The compiler adds the SELF parameter. |
| Action | Remove the parameter from the map member function. |
| PLS-00521 | PLS-00521: ORDER methods must be declared with 1 (one) parameter in addition to (optional) SELF. |
| Cause | An order member function was declared without the user-specified parameter. Order member functions have two parameters, one is the default SELF parameter which is added by the compiler. the second parameter is added by the user and must declare an order method which must be the same type as the containing object type. |
| Action | Check and correct the way the parameter is specified. |
| PLS-00522 | PLS-00522: MAP methods must return a scalar type. |
| Cause | The MAP member function was written such that it returns something other than a scalar type. |
| Action | Rewrite the MAP function such that it returns a scalar type. |
| PLS-00523 | PLS-00523: ORDER methods must return an INTEGER. |
| Cause | An order member function was written such that it returns something other than an integer type. |
| Action | Rewrite the ORDER method such that it returns an integer type. |
| PLS-00524 | PLS-00524: The parameter type in an ORDER method must be the containing object type. |
| Cause | An order member function was declared without the user- specified parameter. Order member functions have two parameters, one is the default SELF parameter which is added by the compiler. the second parameter is added by the user and must declare an order method which must be the same type as the containing object type. |
| Action | Check and correct the way the parameter is specified. |
| PLS-00525 | PLS-00525: Within SQL statements, only equality comparisons of objects are allowed without a map or order function. |
| Cause | A map or order function was not provided for a relational comparison. Only equality comparisons may be used when a map or order function is not supplied. |
| Action | Supply either a map or order function for the object. Otherwise change the program to use only equality comparisons. |
| PLS-00526 | PLS-00526: A MAP or ORDER function is required for comparing objects in PL/SQL. |
| Cause | Within stand alone PL/SQL, an attempt was made to compare objects without a map or order function. |
| Action | Provide a map or order function and retry the operation. |
| PLS-00527 | PLS-00527: MAP or ORDER functions require a PRAGMA RESTRICT_REFERENCES specifying :WNDS,WNPS,RNPS,RNDS. |
| Cause | Either a PRAGMA RESTRICT_REFERENCES was not specified or it was specified without one of the following: WNDS, WNPS, RNPS, or RNDS. |
| Action | Add or correct the PRAGMA and retry the operation. |
| PLS-00528 | PLS-00528: The parameters to an ORDER function must have IN mode |
| Cause | You declared parameter to an ORDER function to have OUT or IN OUT mode. |
| Action | Correct the parameter to use IN mode only. |
| PLS-00529 | PLS-00529: Bad column name string in INSERT statement (must be an identifier) |
| Cause | In an INSERT statement, an attempt was made to use a column name that is not an identifier. In any INSERT statement with explicit column list a column name must be a simple identifier. |
| Action | Rewrite the INSERT statement, using a simple identifier for the column name. |
| PLS-00530 | PLS-00530: Illegal type used for object type attribute: "string". |
| Cause | An attempt was made to use an invalid type for an object type attribute. |
| Action | Use only supported types for the object type attribute. |
| PLS-00531 | PLS-00531: Unsupported type in a VARRAY or TABLE type: "string". |
| Cause | An attempt was made to use an unsupported type in a VARRAY or TABLE type. |
| Action | Use only supported types in a VARRAY or TABLE type. |
| PLS-00532 | PLS-00532: Target of REF must be a complete or incomplete object type. |
| Cause | The target of a REF can only be a complete or an incomplete object type. |
| Action | If a REF is to be used, change the type; otherwise, remove the REF. |
| PLS-00533 | PLS-00533: Tables of non_queryable types are not supported. |
| Cause | An attempt was made to create a table of a type which cannot be queried. Tables of such types are not supported. |
| Action | Create an object type containing the non-queryable type. Then create a table of the object type. |
| PLS-00534 | PLS-00534: A Table type may not contain a nested table type or VARRAY. |
| Cause | An attempt was made to do one of the following: define a table type which contained nested collection types. or define an object table that has (perhaps nested) another table type or VARRAY type. |
| Action | Check the table definitions to be sure that they do not contain nested tables or VARRAYs. |
| PLS-00535 | PLS-00535: A VARRAY type may not contain a NESTED TABLE, VARRAY or LOB |
| Cause | An attempt was made to do one of the following: define a VARRAY type containing a nested collection type or LOB or define a VARRAY type of an object type that has a nested attribute which is one of NESTED TABLE, VARRAY or LOB type. |
| Action | Check the VARRAY definitions to be sure that they do not contain nested colection types, LOBs or nested attributes. |
| PLS-00536 | PLS-00536: Navigation through REF variables is not supported in PL/SQL. |
| Cause | The expression of the form refvar.field was entered. This is not supported in PL/SQL, ver 8.0. |
| Action | none |
| PLS-00537 | PLS-00537: A VARRAY must have a positive limit |
| Cause | A VARRAY type was declared with a non-positive limit, for example VARRAY(0). |
| Action | Declare the VARRAY with a positive limit and retry the operation. |
| PLS-00538 | PLS-00538: subprogram or cursor "string" is declared in an object type specification and must be defined in the object type body |
| Cause | The specified subprogram is declared in an object type"s specification, but is not defined in the object type body. |
| Action | Define the subprogram in the object type body, or remove the declaration from the specification. |
| PLS-00539 | PLS-00539: subprogram "string" is declared in an object type body and must be defined in the object type specification |
| Cause | The specified subprogram is declared in an object type"s body, but is not defined in the object type"s specification. Notice cursor bodies can exist without a specification. |
| Action | Define the subprogram in the object type"s specification, or remove the declaration from the body. |