Oracle Error Message
PLS-00642: local collection types not allowed in SQL statements
Reason for the Error
A locally-defined (i.e. not schema level) collection type was used in a SQL statement. The type must be defined in a schema to be accepted in a SQL statement.
Solution
Define the collection type in your schema, not inside a PL/SQL subprogram.