When executing "select * from table(ReturnEmployees('exempt'));" it got this error
"ORA-22905: cannot access rows from a non-nested table item
22905. 00000 - "cannot access rows from a non-nested table item"
*Cause: attempt to access rows of an item whose type is not known at
parse time or that is not of a nested table type"
What do I do for the error? Thanks.
p.s. the select statement in the following function is pseudo code.
---------------------------------------------------------
FUNCTION ReturnEmployees(inEmpType in VARCHAR2) RETURN SYS_REFCURSOR IS
cur SYS_REFCURSOR;
BEGIN
OPEN cur FOR
select *
from Employee
where EmpType = inEmpType;
RETURN cur;
END;