I have a function that returns dynamic SQL Query sys_refcursor so columns are dynamically returned by this cursor. I want to query that Cursor's sql after executing my function
Select tryit('MyTable_Name',' condition = conditionParameter and condition2=Parameter2') retCursor
from dual
It returns a cursor on PL/SQL SQL Windw as a one column and one row. After clicking on three dots, it returns resultset. How can I get resultset without clicking any dots.
When I cast the function to xmltype and by passing its columns and casting as xmltable, it shows resultset but I need the columns to be created dynamically according to passed parameters.
Select * from xmltable('/ROWSET/ROW'
PASSING xmltype(tryit('MyTable_Name','condition = conditionParameter and condition2=Parameter2'))
columns
Col1 PATH 'Col1',
Col2 PATH 'Col2',
Col3 PATH 'Col3' ,
Col4 PATH 'Col4')
Note: Oracle 11g, PL/SQL Developer 8