Oracle error ORA-22905: cannot access rows from a non-nested table item

后端 未结 5 924
忘了有多久
忘了有多久 2020-12-11 16:35

here\'s the stored procedure i wrote.In this proc \"p_subjectid\" is an array of numbers passed from the front end.

PROCEDURE getsubjects(p_subjectid subject         


        
5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-11 17:30

    you have to cast the results of the pipelined query so:

    If your pipelined function returns a rowtype of varchar2 then define a type (for example )

    CREATE OR REPLACE TYPE char_array_t is VARRAY(32) of varchar2(255);
    select * from table(cast(fn(x) as user_type_t ) );
    

    will now work.

提交回复
热议问题