Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pagination - Limiting search results

Status
Not open for further replies.

Prince26

Systems Engineer
May 17, 2019
8
IN
I have been searching high and low for the query statement to return a certain row in a result set. I have 10000 records in my result set. I want to retrieve only 50 of them at a time for my pagination. Once I am done, I want to retrieve the next 50 and so forward. Is there a simple and direct method to do that?
 
simple and direct? how about a cursor?

==================================
advanced cognitive capabilities and other marketing buzzwords explained with sarcastic simplicity


 
Thanks for the response..

I was reading blogs on cursors last week and it was mentioned to use scrollable cursors but had no idea how do i implement it for pagination...
 
You will need a local array storage element to store 50 at a time. Fetch records until your counter reaches 50 or you hit end of set (no more rows) code. When you are ready, re-execute the procedure to populate 50 rows.

==================================
advanced cognitive capabilities and other marketing buzzwords explained with sarcastic simplicity


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top