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: Using UPDATE with ROWNUM?

Re: Using UPDATE with ROWNUM?

From: Hasta <hasta_l3_at_hotmail.com>
Date: Sat, 30 Jun 2007 06:17:18 +0200
Message-ID: <MPG.20eff7ba9531c177989684@news.dommel.be>


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.

Received on Fri Jun 29 2007 - 23:17:18 CDT

Original text of this message

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