Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: passing ref cursor on a procedure
<span style='font-size:
10.0pt;font-family:Arial;color:navy'>Oops…
<span style='font-size:
10.0pt;font-family:Arial;color:navy'>
<span style='font-size:
10.0pt;font-family:Arial;color:navy'>It’s supposed to be:
<span style='font-size:
10.0pt;font-family:Arial;color:navy'>
<span style='font-size:
10.0pt;font-family:Arial;color:navy'>Variable lCursor REFCURSOR;
<span style='font-size:
10.0pt;font-family:Arial;color:navy'>
<span style='font-size:
10.0pt;font-family:Arial;color:navy'>Not: “declare lCursor REFCURSOR;”
<span style='font-size:
10.0pt;font-family:Arial;color:navy'>
<span
style='font-size:10.0pt;color:navy'>Igor Neyman, OCP DBA
<span
style='font-size:10.0pt;color:navy'>[EMAIL PROTECTED]
<span
style='font-size:10.0pt;color:navy'>
<span style='font-size:
10.0pt;font-family:Arial;color:navy'>
<span
style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor
Neyman
Sent: Wednesday, June 04, 2003
9:40 AM
To: Multiple recipients of list
ORACLE-L
Subject: RE: passing ref cursor on
a procedure
<span
style='font-size:12.0pt'>
<span
style='font-size:10.0pt;font-family:Arial;color:navy'>If in SQL*Plus:
<span
style='font-size:10.0pt;font-family:Arial;color:navy'>
<span
style='font-size:10.0pt;font-family:Arial;color:navy'>Just declare variable of
REFCURSOR type and pass it to stored procedure:
<span
style='font-size:10.0pt;font-family:Arial;color:navy'>
<span
style='font-size:10.0pt;font-family:Arial;color:navy'>DECLARE lCursor
REFCURSOR;
<span
style='font-size:10.0pt;font-family:Arial;color:navy'>Begin
<span
style='font-size:10.0pt;font-family:Arial;color:navy'><procedure_name>(par1,
par2, …, :lCursor);
<span
style='font-size:10.0pt;font-family:Arial;color:navy'>end;
<span
style='font-size:10.0pt;font-family:Arial;color:navy'>/
<span
style='font-size:10.0pt;font-family:Arial;color:navy'>
<font size=2 color=navy
face="Courier New">Igor Neyman, OCP
DBA
<font size=2 color=navy
face="Courier New">[EMAIL PROTECTED]
<font size=2 color=navy
face="Courier New">
<span
style='font-size:10.0pt;font-family:Arial;color:navy'>
<span
style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Hatzistavrou
John
Sent: Wednesday, June 04, 2003
8:40 AM
To: Multiple recipients of list
ORACLE-L
Subject: passing ref cursor on a
procedure
<span
style='font-size:12.0pt'>
<span style='font-size:
10.0pt;font-family:Arial'>Dear All,
<span style='font-size:
10.0pt;font-family:Arial'>I have a vendor procedure which I wish to run .
This
procedure takes as input variables a varchar and a ref_cursor.
<span style='font-size:
10.0pt;font-family:Arial'>I know the query that is related to the ref_cursor
and I wish to implicitly pass it to the procedure . <font size=2
face=Arial>How can this be
done?
<span
style='font-size:10.0pt'>Kind Regards,
<span
style='font-size:12.0pt'>
<span
style='font-size:10.0pt;font-weight:bold'>Hatzistavrou Yannis
Received on Thu Jun 05 2003 - 03:08:12 CDT