Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Limit no of recs in cursor

RE: Limit no of recs in cursor

From: <manoj.gurnani_at_polaris.co.in>
Date: Wed, 17 Mar 2004 15:44:48 +0530
Message-ID: <OF29C53057.26E601BF-ON65256E5A.0037FC08@polaris.co.in>


Hi,

   I need to conditionally update the recs retrieved from the cursor. Can I get an example of the bulk fetch limit clause,if it is suitable in my case.

Thanks
Manoj

-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Justin Cave (DDBC)
Sent: Wednesday, March 17, 2004 2:10 PM
To: oracle-l_at_freelists.org
Subject: RE: Limit no of recs in cursor

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_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of manoj.gurnani_at_polaris.co.in Sent: Wednesday, March 17, 2004 1:29 AM
To: oracle-l_at_freelists.org
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_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Naveen, Nahata (IE10)
Sent: Wednesday, March 17, 2004 1:58 PM
To: oracle-l_at_freelists.org
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_at_polaris.co.in [mailto:manoj.gurnani_at_polaris.co.in]
>Sent: Wednesday, March 17, 2004 1:27 PM
>To: oracle-l_at_freelists.org
>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_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://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_at_freelists.org put
'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://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_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------

Received on Wed Mar 17 2004 - 04:29:04 CST

Original text of this message

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