SQL Language (MOSC)

MOSC Banner

Is there a way to cast a sys_refcursor to a table or xml table or other simple structure I can easil

edited Aug 24, 2016 8:50AM in SQL Language (MOSC) 2 commentsAnswered

I'd like a simple way to access a sys_refcursor.  Below is some examle code.  I call a function which returns a sys_refcursor.  The return contains 0 or 1 rows with many columns.  I need access to only 2 columns.  Those 2 columns are always present if a row is returned and the name is consistent.

All this is to ask, is there a way to cast a sys_refcursor to a table or xml table or other simple structure I can easily access? 

declare
   cursor c1 is select fileid
                  from tbl1
                 where rtype in ('A','Q','R');
--
   l_fileid     number(10);
   cRefRep  sys_refcursor;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center