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: Cursor Question

RE: Cursor Question

From: Kenneth C Stahl <kstahl_at_lucent.com>
Date: Fri, 18 Jun 1999 10:00:41 -0400
Message-ID: <376A5108.65D7BABF@lucent.com>


Someone pointed out to me that there was a problem with what I posted yesterday. The correct code should be:

declare

    some_condition boolean := true;
    cursor c1 is
    select col1
    from mytable;
begin

    while some_condition = true loop

        for i in c1 loop
             if i.col1 = 'some_value' then
                goto end_of_loop;
            end if;
        end loop;
        some_condition := false;
        <<end_of_loop>>
        null;

    end loop;
end;

The problem was that I had the assignment (some_condition := false), the label and the null; statement in the wrong position - it belong just before the END LOOP for the outer loop. Sorry for the confusion. I did a cut and paste operation and got the paste in the wrong place. Received on Fri Jun 18 1999 - 09:00:41 CDT

Original text of this message

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