これが私が書いたストアドプロシージャです。このプロシージャでは、「p_subjectid」はフロントエンドから渡される数値の配列です。
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;
これは私が得ているエラーです。
Oracle error ORA-22905: cannot access rows from a non-nested table item OR
別の投稿で見たように、下のコメントに示されているように、テーブル関数内に「cast(p_subjectid as packg.subjectid_tab)」をキャストしようとしました。しかし、別のエラーが発生しますORA-00902: invalid datatype
。
そして、これが「subjectid_tab」の定義です。
type subjectid_tab is table of number index by binary_integer;
誰かがエラーを教えてもらえますか?私の手順に何か問題がありますか?