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

Home -> Community -> Usenet -> c.d.o.server -> Re: PL SQL variable/scope question

Re: PL SQL variable/scope question

From: Jay Scheiner <jayms_at_nospamaol.com>
Date: Sun, 16 Sep 2001 16:47:49 GMT
Message-ID: <3ba4d721.1308117@news.starpower.net>


Is there a way to distinguish which one you are referencing? Would this work?

x table%rowtype;
begin
for cr in find_rows loop

   x := cr;
   format_procedure;
end loop;

(see my other response example to clarify why just one cursor row won't work.) Thanks again.

On Sat, 15 Sep 2001 19:36:35 +0100, "Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote:

>
>The problem is that the CR in the
>cursor loop is NOT the CR that you
>have declared as a variable, it is an
>implicitly created loop variable.
>
>If you want to do this, one option (of
>several) is to do something like:
>
>open find_rows
>loop
> fetch find_rows into CR;
> exit when find_rows%notfound;
> subr
>end loop;
>
Received on Sun Sep 16 2001 - 11:47:49 CDT

Original text of this message

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