Re: PL/SQL Question

From: K Stahl <BlueSax_at_Unforgetable.com>
Date: 2000/04/03
Message-ID: <38E887EE.5EC5D455_at_Unforgetable.com>#1/1


amerar_at_unsu.com wrote:
>
> Hi there,
>
> I have a cursor FOR loop that will update over 1 million records. The cursor
> is defined with the FOR UPDATE clause. I have a counter that commits after
> every 10000, however when running the program I got this error:
>
> ORA-01002: Fetch out of sequence
>
> What does this mean? Can't I commit within a cursor FOR loop?
>
> Thanks,
>
> Arthur
> amerar_at_unsu.com
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

Instead of using a "for update" clause, just add the rowid of the row that you wish to update to your select statement and then when you do the update use the rowid in the where clause. That way you avoid all of the locks that are a result of the "for update", yet you still have the speed of not having to look the row up with a value. Received on Mon Apr 03 2000 - 00:00:00 CEST

Original text of this message