Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> refcursor question

refcursor question

From: Koivu, Lisa <lkoivu_at_qode.com>
Date: Thu, 26 Oct 2000 14:02:15 -0400
Message-Id: <10661.120317@fatcity.com>


This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01C03F76.E1740CC6
Content-Type: text/plain;

        charset="iso-8859-1"

I am fighting with refcursors and it is getting unpleasant. I need to use bind variables, so my statement is like what follows:

OPEN refcursor FOR 'select :bind1, :bind2' from dual' USING v1, v2;

The select statement is much more complex, and results in the always enlightening ORA-600 [15860], [], [], [], [], [], [], []

My question is, can I use parameterized cursors here?

CURSOR c1 (in_parm1 VARCHAR2)
IS
SELECT col1
FROM table
WHERE col2 = in_parm1;

...

OPEN refcursor FOR c1(v1);

It doesn't like this.

Any suggestions are appreciated - Thank You

Lisa Rutland Koivu
Oracle Database Dork
Qode.com
4850 North State Road 7
Suite G104
Fort Lauderdale, FL 33319

V: 954.484.3191, x174
F: 954.484.2933 
C: 954.658.5849

http://www.qode.com

"The information contained herein does not express the opinion or position of Qode.com and cannot be attributed to or made binding upon Qode.com."

------_=_NextPart_001_01C03F76.E1740CC6
Content-Type: text/html;

        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2650.12">
<TITLE>refcursor question</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Arial">I am fighting with refcursors and it =
is getting unpleasant.&nbsp; I need to use bind variables, so my = statement is like what follows:</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">OPEN refcursor FOR 'select :bind1, =
:bind2' from dual' USING v1, v2;</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">The select statement is much more =
complex, and results in the always enlightening ORA-600 [15860], [], = [], [], [], [], [], []</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">My question is, can I use =
parameterized cursors here?</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">CURSOR c1 (in_parm1 VARCHAR2)</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">IS</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">SELECT col1</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">FROM&nbsp; table</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">WHERE col2 =3D in_parm1;</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">...</FONT>
</P>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">OPEN refcursor FOR c1(v1);</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">It doesn't like this.&nbsp; </FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Any suggestions are appreciated - =
Thank You</FONT>
</P>

<P><B><FONT SIZE=3D1 FACE=3D"Arial">Lisa Rutland Koivu</FONT></B>
<BR><FONT SIZE=3D1 FACE=3D"Arial">Oracle Database Dork</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial">Qode.com</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial">4850 North State Road 7</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial">Suite G104</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial">Fort Lauderdale, FL&nbsp; =
33319</FONT>
</P>

<P><FONT SIZE=3D1 FACE=3D"Arial">V: 954.484.3191, x174</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial">F: 954.484.2933 </FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial">C: 954.658.5849</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial"><A HREF=3D"http://www.qode.com" =
TARGET=3D"_blank">http://www.qode.com</A></FONT>
</P>

<P><I><FONT COLOR=3D"#000000" SIZE=3D1 FACE=3D"Arial">&quot;The =
information contained herein does not express the opinion or position = of Qode.com and cannot be attributed to or made binding upon = Received on Thu Oct 26 2000 - 13:02:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US