7 Replies Latest reply on Aug 2, 2020 4:50 PM by Emu

    cannot execute cursor with nested cursor through ords


      I have a cursor that contains a cursor as in the example below:


        c sys_refcursor;


      open c for select deptno,                   


                               cursor(select empno,                                 


                                                          from emp e

                                                       where e.deptno=d.deptno) emps             

                      from dept d; 

      apex_json.open_object;   a

      pex_json. write('departments', c);  



      If I write this output to a clob it works fine.  If I remove the inner cursor it works fine over ORDS.


      However with the inner cursor if I try to write it over ORDS...I get an indecipherable:

      555 User Defined Resource Error
      Does anyone have any ideas what might be happening here?

      (Using autonomous database : Version 19c, ORDS: 19)