This is where the procedure I wrote is stored. In this proc, "p_subjectid" is an array of numbers passed from the front end.
PROCEDURE getsubjects(p_subjectid subjectid_tab,p_subjects out refCursor) as BEGIN open p_subjects for select * from empsubject where subject_id in (select column_value from table(p_subjectid)); --select * from table(cast(p_subjectid as packg.subjectid_tab)) END getsubjects;
This is the error I am getting.
Oracle error ORA-22905: cannot access rows from a non-nested table item OR
as I saw in different posts, I tried pouring "cast (p_subjectid as packg.subjectid_tab)" inside the table function, as indicated in the comment below. But I get another error: ORA-00902: invalid datatype .
And that definition is "subjectid_tab".
type subjectid_tab is table of number index by binary_integer;
Can someone please tell me what the error is. Something is wrong with my procedure.
oracle10g
Rohith rajan
source share