Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Using UPDATE with ROWNUM?
In article <1183151689.328262_at_bubbleator.drizzle.com>,
damorgan_at_psoug.org says...
> Hasta wrote:
>
> > But why would the OP get ora-1555, Joel (and Frank and Daniel) ?
> >
> > He is not commiting in a cursor loop, afaics
> >
> > begin
> > loop
> > update (select seq_no from mytable) set seq_no = tempseq.nextval
> > where rownum <= 1000;
> > exit when SQL%FOUND = false;
> > commit;
> > end loop;
> > end;
> >
> > --- Raoul
>
> Lets see:
>
> EXIT ...
> COMMIT ...
> END LOOP ...
>
> He isn't?
>
I meant that he is not fetching accross commit, Daniel - that is, the loop is not of the kind :
for i in (select ... )
loop ... commit; end loop;
I'll have to ckeck "One on One", because - call me stupid - I still dont get it. The implicit cursor underlying the update statement is closed after execution of the statement, within the loop body. I dont see why a pre-image should have to be rebuilt from rollback segments across loop body executions.