PLS-00386: type mismatch found between FETCH cursor and INTO variables

人走茶凉 提交于 2019-12-01 11:07:06

you'd need to use the object constructor on the select:

SELECT OBJTYP(A, B, C)
   FROM my_table
  WHERE Study_Number = p_StudyNum(i)

but you can simplify the procedure to this instead of all those loops:

begin
select cast(multiset(select /*+ cardinality(s, 10) */ a, b, c
                        from my_table t, table(p_StudyNum) s
                      where t.study_number = s.column_value) as OutputTyp)
   into p_StdyDtl
   from dual;
end;

Try declaring your cursor as:

CURSOR c_StudyTbl
IS
  SELECT OBJTYP(A, B, C)
    FROM my_table
    WHERE Study_Number = p_StudyNum(i);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!