Re: How to execute procedure returning refcursor from sqlplus
- From: "Alberto Dell'Era" <alberto.dellera@xxxxxxxxx>
- To: ajay_1ajay1@xxxxxxxxx
- Date: Tue, 19 Dec 2006 23:35:14 +0100
On 12/19/06, Ajay <ajay_1ajay@xxxxxxxxx> wrote:
If you are talking about ref cursor : You need to do it from a pl/sql block
define variable for cursor and for record to same as in the SP.
then have loop and fetch the cursor to record. exit loop when cursor
not found.
Not necessarily:
dellera@ORACLE10> create or replace procedure p (p_out out sys_refcursor)
2 is
3 begin
4 open p_out for select 'bye' as salutation from dual;
5 end;
6 /
Procedure created.
dellera@ORACLE10> variable r refcursor
dellera@ORACLE10> begin p (:r); end;
2 /
PL/SQL procedure successfully completed.
dellera@ORACLE10> print r
SALUTATIO
---------
bye
--
Alberto Dell'Era
"Per aspera ad astra"
--
http://www.freelists.org/webpage/oracle-l
- References:
- Re: How to execute procedure returning refcursor from sqlplus
- From: Alberto Dell'Era
Other related posts:
- » How to execute procedure returning refcursor from sqlplus
- » Re: How to execute procedure returning refcursor from sqlplus
- » RE: How to execute procedure returning refcursor from sqlplus
- » Re: How to execute procedure returning refcursor from sqlplus
- » Re: How to execute procedure returning refcursor from sqlplus
- » Re: How to execute procedure returning refcursor from sqlplus
If you are talking about ref cursor : You need to do it from a pl/sql block define variable for cursor and for record to same as in the SP. then have loop and fetch the cursor to record. exit loop when cursor not found.
- Re: How to execute procedure returning refcursor from sqlplus
- From: Alberto Dell'Era