I tried these options but getting error: DECLARE P_INTERVAL NUMBER; v_cursor refcursor; BEGIN P_INTERVAL := 885653507; Proce ( P_INTERVAL, :v_cursor ); print :v_cursor; COMMIT; END; / SP2-0552: Bind variable "V_CURSOR" not declared -----Original Message----- From: rjamya [mailto:rjamya@xxxxxxxxx] Sent: Monday, December 18, 2006 11:13 AM To: Harvinder Singh Cc: oracle-l Subject: Re: How to execute procedure returning refcursor from sqlplus var myref refcursor exec my_proc(:myref,param1,param2,...); print :myref Raj On 12/18/06, Harvinder Singh <Harvinder.Singh@xxxxxxxxxxxxx> wrote: > Hi, > > We have a procedure that returns the sys_refcursor as an ouput and that is > select statement with 2 columns, now I have to execute that procedure from > sqlplus/toad and display the results, How can I declare a local varaiables > and execute the procedure and return thre result using dbms_output? -- //www.freelists.org/webpage/oracle-l