Oracle Error PLS-00487: Invalid reference to variable ‘string’

Oracle Error Message

PLS-00487: Invalid reference to variable ‘string’

Reason for the Error

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 …

Solution

Check the spelling of the variable name. Make sure the variable was declared properly and that the declaration and reference are consistent regarding datatype.

Share:

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

Oracle Error Message CLSGN-32767: Internal error. Reason for the Error An unexpected error occurred. Solution Examine the message(s) that accompany...
Oracle Error Message CLSGN-00211: OCR batch operation failed. string Reason for the Error Setting a set of Oracle Cluster Registry...
Oracle Error Message CLSGN-00210: failed to get value for OCR key “string”. string Reason for the Error It was not...