If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Returning small managable sets from a SELECT statement

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-17-03, 05:25
thomaskeegan thomaskeegan is offline
Registered User
 
Join Date: Apr 2003
Posts: 7
Question Returning small managable sets from a SELECT statement

I have a Database that contains 10,000 records. I execute a SELECT statement that returns 8000. I need those 8000 and cannot refine my statement to return a smaller subset.

My problem is I don't want all the results back in one go. I would like to return to 1000 rows on my first call. On my second call I would like another 1000 rows starting from the end of the last call and so on...

Is this possible? Also the table has no unique key either, and that ain't gonna change.

Any suggestions. I would like to implement this in SQL.

Thanks in advance to anyone who comes up with a good solution
Reply With Quote
  #2 (permalink)  
Old 04-17-03, 05:41
alligatorsql.com alligatorsql.com is offline
Registered User
 
Join Date: Jul 2001
Location: Germany
Posts: 189
You can use cursor in PL/SQL

Hello,

you can use PL/SQL to open a cursor an fetch the records block wise ..

Use

OPEN, FETCH and CLOSE statements to create a package and use this in your application.

Hope that hint helps ?

Manfred Peter
(Alligator Company GmbH)
http://www.alligatorsql.de
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On