Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL SQL variable/scope question
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