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: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Sat, 30 Jun 2007 11:46:48 +0200
Message-ID: <f658q3$ahm$1@news2.zwoll1.ov.home.nl>


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

DA Morgan wrote:
> 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?

But it is not a CURSOR loop. He's right about that. Nevertheless, he might create 1555's for other sessions, as someone pointed out (including the link to Tom Kytes demo)

But the OP's major concern is not resolved here - as it loops until done, locks are taken all the time.

Top-posting is one way to shut me up...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)

iD8DBQFGhiaILw8L4IAs830RAqm5AJ94s8Kc6Ojoq0VqUmfA84yx0/WscQCeKNhq fJcelkbkbdGshHSG7vid0UY=
=FFyB
-----END PGP SIGNATURE----- Received on Sat Jun 30 2007 - 04:46:48 CDT

Original text of this message

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