Yes you can. Just use something like
Create or replace procedure test_ref (pout_refc1 out sys_refcursor,
pout_refc2 out sys_refcursor) as
Begin
Open pout_refc1 for select empno,name from emp ;
Open pout_refc2 for select deptno,deptname from dept ;
End test_ref ;
And in your calling program...
Declare
Rc1 sys_refcursor ;
Rc2 sys_refcursor ;
L_empno emp.empno%type ;
L_name emp.name%type ;
Begin
test_ref(pout_refc1 => rc1 , pout_ref_c2 => rc2) ;
loop
fetch rc1 into l_empno, l_name ;
exit when rc1%notfound ;
-- process statements
end loop ;
-- other process statements
End ;
This is to give you a general idea. Apologies for any syntax errors that
might be in there as I haven't run the actual code above.
Stephen Weston
-----Original Message-----
From: Rajavardhan
[mailto:oracledba-ezmlmshield-x16611987.[Email address protected]
Sent: 30 March 2007 09:51
To: LazyDBA Discussion
Subject: can i have two out parameters in procedures
Hello
Guru's
Can we have two out parameters of type reffence cursor in a procedures
And can we give example of how call or execute ures
Thanks & Regards
V.Rajavardhan Reddy
Software Engineer
GSS America Infotech Ltd.
Block B, 3'rd Floor,
Cyber Gateway,
Hi-Tech City,
Hyderabad.
Tel:- 040-40028700
Fax:- 040-40028703
Visit us: http://www.gssamerica.com
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
Oracle LazyDBA home page