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 -> 'Fetch Out of Sequence'?

'Fetch Out of Sequence'?

From: Paul Swallow <113220.3573_at_CompuServe.COM>
Date: 1998/04/02
Message-ID: <#efuP0lX9GA.352@nih2naaa.prod2.compuserve.com>#1/1

Does anyone agree that the following nested loop should not produce a 'fetch-out-of-sequence' error when tables paul2 & paul3 each have 2 rows 'Committed'? Unfortunately this error does occur!  

OPEN cur1;
LOOP <<LOOP1>>

    FETCH cur1 INTO var1;
    EXIT WHEN cur1%NOTFOUND;
    OPEN cur2;
    LOOP <<LOOP2>>

        FETCH cur2 INTO var2;
        EXIT WHEN cur2%NOTFOUND;
        INSERT INTO PAUL VALUES('X');
        ROLLBACK;

    END LOOP LOOP2;
    CLOSE cur2;
END LOOP LOOP1;
    CLOSE cur1;
 

-- 
-------  --------       -------  

------- -------- -------
------- -------- -------
------- -------- -------
Received on Thu Apr 02 1998 - 00:00:00 CST

Original text of this message

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