Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

cannot execute cursor with nested cursor through ords

EmuJul 31 2020 — edited Aug 2 2020

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

DECLARE

  c sys_refcursor;

BEGIN

open c for select deptno,                   

                          dname,                    

                         cursor(select empno,                                 

                                                   ename                            

                                                    from emp e

                                                 where e.deptno=d.deptno) emps             

                from dept d; 

apex_json.open_object;   a

pex_json. write('departments', c);  

apex_json.close_object;

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)

Comments

Processing

Post Details

Added on Jul 31 2020
7 comments
774 views