Link to home
Start Free TrialLog in
Avatar of sbornstein2
sbornstein2

asked on

Oracle - How do I execute a stored procedure in TOAD to show returned output cursor?

I want to test my stored proc out and it returns an output cursor.  How can I do this to see the results like execute "procname"(Input param, output sysrefcursor)
SOLUTION
Avatar of sventhan
sventhan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sbornstein2
sbornstein2

ASKER

sv still a little confused this is what I have and I am passing in 'C15' as the first input param..

procedure GET_EDIPLATINUM_ACCOUNTS(in_list in varchar2, p_rc out sys_refcursor) is
  begin
    open p_rc for
    Select Cus_Parent, Parent_Name,
        BillRun, Folder,
        Map_Version
      From BillRun.RPT_CUSTOM_XLS
      Where (Delivery_Method like '%EDI%' Or Delivery_Method like '%GSI%')
      and BillRun IN (' || in_list || ')
        Order By BillRun, Cus_Parent;
  end;
In the Procedure Editor, load your procedure. Click on the lightning
bolt to execute and you will see the Set Parameters window, which is
also available via the button on the Proc Editor toolbar that has an
image similar to (...) on it, next to the lightning bolt. Click on the
output options button and you'll see your options. If this is a weak ref
cursor then you must use the in-memory grid option. Results go to the
cursor results tab at the bottom of the PE after you execute.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I tried executing and then selected the memory output to grid, i typed in my input param the out cursor is set to null:

ORA-06550: line 3, column 30:
PLS-00302: component 'SYS_REFCURSOR' must be declared
ORA-06550: line 3, column 8:
PL/SQL: Item ignored
ORA-06550: line 9, column 61:
PLS-00320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 9, column 3:
PL/SQL: Statement ignored
ORA-06550: line 11, column 16:
PLS-00320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 11, column 3:
PL/SQL: Statement ignored

did you declare the ref cursor.
see paquicuba's post for example.