Can you explain a bit of background-- are you doing some processing of the rows (so that you want to eventually retrieve all the rows), are you doing some sort of paging (so users may or may not want to fetch the next page of data)? For the former, I would do bulk fetches into collections using the LIMIT clause, though I would tend to fetch records 1000 at a time rather than 1 000 000 at a time. Will you always be fetching the next set of records in the same session that you fetched the first set of records? Will you be fetching the records in the same transaction? Justin Cave Distributed Database Consulting, Inc. http://www.ddbcinc.com/askDDBC -----Original Message----- From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of manoj.gurnani@xxxxxxxxxxxxx Sent: Wednesday, March 17, 2004 1:29 AM To: oracle-l@xxxxxxxxxxxxx Subject: RE: Limit no of recs in cursor Importance: High Hi, I want to process the remaining recs also. How can I achieve the below logic: I.e if 5 lakh recs in cursor,the pl/sql script should pick 1 lakh recs in cursor. The next time I execute the same script,it should pick the next 1 lakh recs. Thanks Manoj -----Original Message----- From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Naveen, Nahata (IE10) Sent: Wednesday, March 17, 2004 1:58 PM To: oracle-l@xxxxxxxxxxxxx Subject: RE: Limit no of recs in cursor by using a WHERE clause? If you already have a where clause in your query, then append the following: AND rownum < 100 >-----Original Message----- >From: manoj.gurnani@xxxxxxxxxxxxx [mailto:manoj.gurnani@xxxxxxxxxxxxx] >Sent: Wednesday, March 17, 2004 1:27 PM >To: oracle-l@xxxxxxxxxxxxx >Subject: Limit no of recs in cursor >Importance: High > > >Hi All, > I have a cursor which retrieves recs in lakhs . >How can I limit the no of recs in the cursor. > > >Thanks >Manoj > > > > > ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request@xxxxxxxxxxxxx put 'unsubscribe' in the subject line. -- Archives are at //www.freelists.org/archives/oracle-l/ FAQ is at //www.freelists.org/help/fom-serve/cache/1.html ----------------------------------------------------------------- ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request@xxxxxxxxxxxxx put 'unsubscribe' in the subject line. -- Archives are at //www.freelists.org/archives/oracle-l/ FAQ is at //www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------