Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Cursor Variable question
Hello all,
Gave myself a project to split up some of the code I wrote. I want to change one of my utility procedures to return a ref cursor to the calling program.
Right now it uses pl/sql tables. Ref cursors and index-by tables do not play together, so I'm replacing the pl/sql tables with a declared record object.
With an index-by table I can buzz through it as many times as I want, restart at record 1, no problem. However, it looks like I can't do that with ref cursors. You open the cursor 'FOR' the query and return the refcursor, limiting loops by 'EXIT WHEN refcur%NOTFOUND'. Call me a bonehead but I can't figure out how to blow through a refcursor over and over without reopening the refcursor and causing another hit to the database (which is what I'm trying to avoid, the data I need is already in memory). Is it possible to 'rewind' a refcursor without closing it and reopening it?
Please enlighten me if I've got this wrong.
Thank you
Lisa Koivu
Oracle Database Monkey Mama
Fairfield Resorts, Inc.
954-935-4117
Received on Mon Oct 29 2001 - 15:21:21 CST
![]() |
![]() |