Oracle Error Message
PLS-00327: “string” is not in SQL scope here
Reason for the Error
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;
Solution
Check the spelling of all database objects in the SQL statement, and make sure all references are to objects within the current scope.