Re: CURSORS

From: jpsb <jpsb_at_starbase.neosoft.com>
Date: 1995/10/27
Message-ID: <46pn09$qv2_at_uuneo.neosoft.com>#1/1


Ravindr Dankanikote 703-913-2537 (dankanir_at_postoffice.manassas.ibm.com) wrote:
: I have tables with a million rows at a time. I want to fetch 500 rows
: at a time. Because I am constrained by both RAM and performance,
: I cannot retreive everything to memory or bring it to some other
: storage area.I need to be able to go back for a previous 500 rows at any
: given time. Is this possible?
: We use Stored Procedures to access everything in our database.
: Can I declare a pl_sql table and select my results into that ?
: Any other ideas?
: Thanks
: Ravi
: dankanir_at_lfs.loral.com
: --
: Ravindr Dankanikote 703-913-2537

Leave the cursor open inside your databse routine , set a static int so that the then next you call the databse routine the logic will skip the section of code which does the SELECT and fall into the section of code which FETCHES. Once all records have been FETCHed close the cursor and unset the static int. This should work for you . It worked for me years ago.

jim shirreffs..

PS this requirres ProC or someother pre compiler. Hope it is posible with stored procedures.. Received on Fri Oct 27 1995 - 00:00:00 CET

Original text of this message