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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Cursor parameters in subqueries

Re: Cursor parameters in subqueries

From: Dragan Pavljuk <dpavljuk_at_beotel.yu>
Date: Sun, 08 Nov 1998 02:03:53 +0100
Message-ID: <3644EDF8.572F09A@beotel.yu>


Try to write your cursor like this :

cursor test (mypar IN CHAR)
select t1.x, t1.a, t2.y, t2.b
  from table1 t1,table t2
 where t1.x = t2.y

     and t2.b = mypar;

Dragan

Jens Mayer wrote:

> Hi folks,
>
> I created a cursor with a subquery in the Cursor Body. Now I tried to
> pass the Cursor-Parameters to this subquery, but Oracle cannot
> compile it (PLS-00320)
>
> My Cursor was something like this:
>
> cursor test (mypar IN CHAR)
> select x,a
> from table1 t1,
> (select y,b
> from table2
> where table2.b = mypar) t2
> where t1.x = t2.y;
>
> What's wrong ? Any suggestions ?
>
> Thanx, Jens
Received on Sat Nov 07 1998 - 19:03:53 CST

Original text of this message

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