Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> RE: Cursor Question
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;
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