Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to reset a cursor in PL/SQL?

630622Apr 10 2008 — edited Apr 10 2008
Hi everyone

I have a CURSOR in PL/SQL with a number N of rows. I fetch all these rows in a bucle, but, when the last row is arrived, and the condition NOTFOUND is true, I'd like to return to the first row, and do the same process again. I mean, fetching every row a number of times k. For example, in a cursor of 3 rows:

Row 1
Row 2
Row 3
Row 1
Row 2
... and on

If I close the cursor and then I open it, there is no data, because the cursor is in the last row and the FETCH return NOTFOUND, so I'd like to "reset" the cursor and begin from the first row again.

How could I do this?

Thank you very much and sorry for my english
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 8 2008
Added on Apr 10 2008
3 comments
3,092 views