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

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

Cause: A proscribed function was used in a SQL statement. Certain functions such as SQLCODE and SQLERRM can be used only in procedural statements.

Action: Remove the function call from the SQL statement. Or, replace the function call with a local variable. For example, the following statement is illegal: INSERT INTO errors VALUES (SQLCODE, SQLERRM); However, you can assign the values of SQLCODE and SQLERRM to local variables, then use the variables in the SQL statement, as follows: err_num := SQLCODE; err_msg := SQLERRM; INSERT INTO errors VALUES (err_num, err_msg);

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

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 ... However, only IN parameters can be initialized to default values.

Action: Remove the illegal default expression.

PLS-00229: Attribute expression within SQL expression

PLS-00229: Attribute expression within SQL expression

Cause: An attribute expression, such as SQL%NOTFOUND, was used in a SQL statement, but attribute expressions are allowed only in procedural statements.

Action: To workaround this limitation, assign the value of the attribute expression to a variable, then use the variable in the SQL statement. For example, replace the statement INSERT INTO audits VALUES (c1%ROWCOUNT, ...); with the following statements: row_count := c1%ROWCOUNT; INSERT INTO audits VALUES (row_count, ...);

PLS-00228: Illegal declaration of variable of type LONG

PLS-00228: Illegal declaration of variable of type LONG

Cause: The identifier is a formal parameter which is being used in the context of a default expression value for a formal parameter in the same formal parameter list. E.g.: procedure p(j number, k number := j).

Action: Remove the offending variable definition

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

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

Cause: When the formal parameters of a subprogram were declared, one parameter was used to initialize another, as in PROCEDURE my_proc (j NUMBER, k NUMBER := j) IS ... The first parameter has no value until run time, so it cannot be used to initialize another parameter.

Action: Remove the illegal formal parameter reference.

PLS-00226: package string used as variable reference

PLS-00226: package string used as variable reference

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

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

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

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

Cause: The prefix in a qualified name was a subprogram or cursor which was not in an enclosing scope; i.e., a subprogram or cursor name is being used as a scope qualifier for a reference to an entity (within that subprogram or cursor) that is not in scope. Example: declare x number; type t1 is record (a number); function f return t1 is a number; begin x := f.a; -- legal use of function f as a scope qualifier; --resolves to local variable a in function f . x := f().a; --legal reference to component a of returned record end; begin x := f.a; -- illegal use of function f as a scope qualifier x := f().a; --legal reference to component a of returned record end;

Action: a) if the intention was to refer to a local variable of a non-enclosing function, this is not allowed; remove the reference b) if this is a parameterless function, and the the intention was to access a field of the result of a call to this function, then use empty parentheses in the call.

PLS-00224: object string must be of type function or array to be used this way

PLS-00224: object string must be of type function or array to be used this way

Cause: An identifier being referenced as a function or an array actually represents an object (a number or date, for example) that cannot be referenced in this way.

Action: Check the spelling and declaration of the identifier. Also confirm that the declaration is placed correctly in the block structure.

PLS-00223: paramaterless procedure string used as function

PLS-00223: paramaterless procedure string 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-00222: no function with name string exists in this scope

PLS-00222: no function with name string 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-00221: string is not a procedure or is undefined

PLS-00221: string 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-00220: simple name required in this context

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-00219: label string reference is out of scope

PLS-00219: label string 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-00218: a variable declared NOT NULL must have an initialization assignment

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. If the initilization is too complicated for the syntax, one can add a function call (in a later release).

PLS-00217: NUMBER scale constraint must be in range (-84 .. 127)

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-00216: NUMBER precision constraint must be in range (1 .. 38)

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-00215: String length constraints must be in range (1 .. 32767)

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 .. 32,767

PLS-00214: BEGIN...END block nesting is too deep

PLS-00214: BEGIN...END block nesting is too deep

Cause: The number of levels of nesting in the PL or 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-00213: package STANDARD not accessible

PLS-00213: package STANDARD not accessible

Cause: The PL or SQL compiler could not find package STANDARD in the current Oracle database. To compile a program, PL or SQL needs package STANDARD.

Action: Make sure that package STANDARD is available in the current Oracle database, then retry the operation.

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

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

Cause: The CASE statement is too big. The compiler did not have enough storage to process it.

Action: none

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

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

Cause: In this CASE statement, a value appears in more than one WHEN clause. A value may appear in at most one WHEN clause of a CASE statement.

Action: none

PLS-00210: an OTHERS clause is required in this CASE statement

PLS-00210: an OTHERS clause is required in this CASE statement

Cause: Unless the clauses of a CASE statement mention all values of the type of the selecting expression, an OTHERS clause must be provided as the last clause of the CASE statement. It is impossible to cover all values of type INTEGER (or NUMBER), so an OTHERS clause is always required when the expression following the keyword CASE is of type INTEGER (or NUMBER).

Action: none

PLS-00209: table string is not in FROM clause

PLS-00209: table string 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-00208: identifier string is not a legal cursor attribute

PLS-00208: identifier string 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-00207: identifier string , applied to implicit cursor SQL, is not a legal cursor attribute

PLS-00207: identifier string , 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-00206: %%TYPE must be applied to a variable, column, field or attribute, not to string

PLS-00206: %%TYPE must be applied to a variable, column, field or attribute, not to string

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-00205: Aggregate not allowed here

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-00204: function or pseudo-column string may be used inside a SQL statement only

PLS-00204: function or pseudo-column string 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, ...); with the following statement: SELECT DECODE(rating, 1, 5000, 2, 2500, ...) INTO bonus FROM dual;

PLS-00203: function DECODE must be called with at least 3 non-boolean arguments

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-00202: type string must be declared

PLS-00202: type string 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-00201: identifier string must be declared

PLS-00201: identifier string must be declared

Cause: You tried to reference either an undeclared variable, exception, procedure, or other item, or an item to which no privilege was granted or an item to which privilege was granted only through a role.

Action: 1) Check your spelling and declaration of the referenced name. 2) Verify that the declaration for the referenced item is placed correctly in the block structure. 3) If the referenced item is indeed declared but you don t have privileges to refer to that item, for security reasons, you will be notified only that the item is not declared. 4) If the referenced item is indeed declared and you believe that you have privileges to refer to that item, check the privileges; if the privileges were granted only via a role, then this is expected and documented behavior. Stored objects (packages, procedures, functions, triggers, views) run in the security domain of the object owner with no roles enabled except PUBLIC. Again, you will be notified only that the item was not declared.

PLS-00181: unsupported preprocessor directive string

PLS-00181: unsupported preprocessor directive string

Cause: An unsupported preprocessor directive was used.

Action: Use a supported preprocessor directive.

PLS-00180: preprocessor directives are not supported in this context

PLS-00180: preprocessor directives are not supported in this context

Cause: A preprocessor directive was used in a compilation unit for which conditional compilation is not supported.

Action: Do not use any preprocessor directives in this compilation unit.

PLS-00179: $ERROR: string

PLS-00179: $ERROR: string

Cause: $ERROR directive was used. This is an expected error message.

Action: NA

PLS-00178: a static character expression must be used

PLS-00178: a static character expression must be used

Cause: The expression contained a syntax or semantic error, or it did not have a character type or its evaluation raised an exception.

Action: Write correct static character expression.

PLS-00177: $string preprocessor directive does not end properly

PLS-00177: $string preprocessor directive does not end properly

Cause: A preprocessor directive was not ended properly.

Action: Use $end to end the preprocessor directive properly.

PLS-00176: unexpected preprocessor token $string

PLS-00176: unexpected preprocessor token $string

Cause: A preprocessor token was used inappropriately.

Action: Remove the preprocessor token that is inappropriately used.

PLS-00174: a static boolean expression must be used

PLS-00174: a static boolean expression must be used

Cause: The expression contained a syntax or semantic error, or it did not have a boolean type or its evaluation raised an exception.

Action: Write correct static boolean expression.

PLS-00173: SPACE, TAB or RETURN are disallowed as alternative quote delimiters

PLS-00173: SPACE, TAB or RETURN are disallowed as alternative quote delimiters

Cause: SPACE, TAB or RETURN was used as alternative quote delimiter.

Action: Use a character other than SPACE, TAB or RETURN as the alternative quote delimiter.

PLS-00172: string literal too long

PLS-00172: string literal too long

Cause: The string literal was longer than 32767 bytes.

Action: Use a string literal of at most 32767 bytes.

PLS-00171: duplicate dedicated AGENT specification in subprogram expression

PLS-00171: duplicate dedicated AGENT specification in subprogram expression

Cause: The subprogram was found to have two dedicated AGENT specifications.

Action: Remove one of the dedicated AGENT specifications.

PLS-00170: the SQL statement in an OPEN statement or FOR loop must be a SELECT

PLS-00170: the SQL statement in an OPEN statement or FOR loop must be a SELECT

Cause: An OPEN cursor statement or cursor FOR loop can only invoke a SELECT statement, not an UPDATE, INSERT or DELETE.

Action: Use only SELECT statements in OPEN or cursor FOR loops

PLS-00169: modifier string conflicts with prior string specification

PLS-00169: modifier string conflicts with prior string specification

Cause: The method or object type modifier specified conflicts with an earlier modifier. For example, a FINAL modifier cannot be combined with a NOT FINAL modifier.

Action: Remove one of the conflicting modifiers.

PLS-00168: duplicate modifier specification string

PLS-00168: duplicate modifier specification string

Cause: A method or object type modifier was specified more than once.

Action: Remove all but one occurence of the duplicate modifier.

PLS-00167: keyword BULK is used in a wrong context

PLS-00167: keyword BULK is used in a wrong context

Cause: keyword BULK is used illegally. For example, BULK is used without INTO clause

Action: remove the keyword BULK.

PLS-00166: bad format for date, time or timestamp literal

PLS-00166: bad format for date, time or timestamp literal

Cause: The contents of the date, time or timestamp literal did not match the expected format yyyy-mm-dd hh24:mi:ssxfftzh:tzm .

Action: Use a correctly-formatted datetime literal.

PLS-00165: call statement is not supported in PL or SQL

PLS-00165: call statement is not supported in PL or SQL

Cause: A CALL statement was found in PL or SQL source.

Action: Use an ordinary PL or SQL function or procedure call.

PLS-00164: cursor subqueries are not supported in this release

PLS-00164: cursor subqueries are not supported in this release

Cause: This feature is not yet implemented.

Action: none

PLS-00162: Pragma string expects 4th argument to be a positive integer literal

PLS-00162: Pragma string expects 4th argument to be a positive integer 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 misspelled, or the pragma syntax might be faulty (for example, a comma might be missing between two parameters).

Action: Check the spelling of the fourth parameter, and make sure the proper syntax was used.

PLS-00161: Pragma string expects 3rd argument to be an identifier or a string literal

PLS-00161: Pragma string expects 3rd argument to be an identifier or a string literal

Cause: The third argument (actual parameter) passed to the named pragma (compiler directive) was not an identifier or a string literal when there is a fourth argument to the pragma. 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-00160: AUTHID must specify CURRENT_USER or DEFINER

PLS-00160: AUTHID must specify CURRENT_USER or DEFINER

Cause: The only two allowed options for AUTHID are CURRENT_USER and DEFINER.

Action: Fix the AUTHID clause to specify CURRENT_USER or DEFINER

PLS-00157: AUTHID only allowed on schema-level programs

PLS-00157: AUTHID only allowed on schema-level programs

Cause: An AUTHID clause was specified for a subprogram inside a package or type. These clauses are only supported for top-level stored procedures, packages, and types.

Action: Remove the clause

PLS-00156: Null constraints not supported for object attributes.

PLS-00156: Null constraints not supported for object attributes.

Cause: A null constraint was specified for an attribute in an object. This is not supported.

Action: Remove the constraint.

PLS-00155: Only a function may be a MAP, ORDER or CONSTRUCTOR method.

PLS-00155: Only a function may be a MAP, ORDER or CONSTRUCTOR method.

Cause: A procedure was declared as a MAP, ORDER or CONSTRUCTOR method. Only functions can be MAP, ORDER or CONSTRUCTOR methods.

Action: none

PLS-00154: An object type may have only 1 MAP or 1 ORDER method.

PLS-00154: An object type may have only 1 MAP or 1 ORDER method.

Cause: More than one map or order function was declared. An object type can have only one map function or one order function, but not both.

Action: none

PLS-00153: A string type may only be used as an object type attribute.

PLS-00153: A string type may only be used as an object type attribute.

Cause: A POINTER or (SIGNED or UNSIGNED( BINARY INTEGER can only be used as attributes of object types. These types can only be referenced in CREATE TYPE statements, and are non-queryable data types. One of these external PL or SQL types outside of an object type.

Action: none

PLS-00151: Expression or Variable is an illegal type to PLS or QL: string

PLS-00151: Expression or Variable is an illegal type to PLS or QL: string

Cause: A type was used which does not belong PL or SQL. This type can only be referenced in CREATE TYPE statements, and is a non-queryable data type.

Action: none

PLS-00150: found: string but expected : INTEGER

PLS-00150: found: string but expected : INTEGER

Cause: This error happens in the creation of a pl or sql external type: (SIGNED | UNSIGNED( BINARY INTEGER (lamp;lt;lamp;nbsp;precisionlamp;gt;). It may be referenced only in a create type statement. Such types are non-queryable. Something other than INTEGER was supplied.

Action: none

PLS-00148: Only 1 pragma of this type is allowed per subprogram

PLS-00148: Only 1 pragma of this type is allowed per subprogram

Cause: The subprogram was found to have two PRAGMA RESTRICT_ REFERENCES.

Action: Remove one of the PRAGMA RESTRICT_REFERENCES.

PLS-00147: LIBRARY file specification string is empty

PLS-00147: LIBRARY file specification string is empty

Cause: A zero-length string was found for the LIBRARY file specification.

Action: Specify a non-zero length string for the LIBRARY file specification.