Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-01002 fetch out of sequence
news.globetrotter.net <bergeronj__at_consultik.com> wrote in article
<71nnds$28d$1_at_news.quebectel.com>...
> I receive this message when i'm trying to delete or update a record.
>
> What can be the problem with that?
>
> thanks,
>
> Joel
>
>
>
IF A UNDERSTAND YOU GOOD
YOU DO LIKE THIS
CURSOR C1 IS
SELECT * FROM TABLE;
BEGIN
FOR REK IN C1 LOOP
...
UPDATE TABLE
WHERE CURRENT OF C1;
....
END LOOP;
IF YOU DO THIS YOU MUST USE CURSOR LIKE THIS
CURSOR C1 IS
SELECT * FROM TABLE
FOR UPDATE;
(ANOTHER PROBLEM IF YOU MAKE COMMIT KILL YOU COMMIT AND ALL BE BETTER)
FOR REK IN C1 LOOP
...
COMMIT;
UPDATE TABLE
WHERE CURRENT OF C1;
....
END LOOP;
Received on Wed Nov 04 1998 - 03:45:27 CST
![]() |
![]() |