Oracle Message PLS-00642 - local collection types not allowed in SQL statements

ERRORlocal collection types not allowed in SQL statements
CAUSEA 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.
ACTIONDefine the collection type in your schema, not inside a PL/SQL subprogram.