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.

Can we use PL/SQL Cursor variable as an out parameter in a GET API?

Ankan ChandaMay 4 2021

Hi team,
We are trying to fetch email of some users from a table using pl/sql stored procedure. What we are trying to achieve is that ,in the handler section we are passing a variable called list (containing list of mails in the stored procedure) to a sys_refcursor variable called l_cursor and in the restful services we are providing the begin insert command like this:
declare l_cursor out SYS_REFCURSOR;
begin
RETRIEVDATA(list => l_cursor);
end;
Now my query is what to do with the l_cursor variable? Should we bind it with list? Which one will be the bind variable here, as I assume, l_cursor will be the bind variable. We did that and the other way round but it still gives HTTP 555 error.
Please suggest as to how can we fetch the emails through the GET API?

Comments

Processing

Post Details

Added on May 4 2021
3 comments
2,365 views