【发布时间】:2018-04-30 17:19:41
【问题描述】:
这是我编写的存储过程。在这个过程中,“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;
谁能告诉我错误是什么。我的程序有什么问题吗。
【问题讨论】:
标签: oracle10g