• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help required with DB pagination

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am trying to implement pagination in my reports using SQl queries.
My query is as follows


This works perfectly fine until I want to sort on the cust_id column of my table.
I am assuming that the query will be



This returns results like



Now when I query for the next set of records with


I get



How do I ensure that I get all rows with Cust Ids 1 in the first query and then all
with Cust ids 4 in the next query ?

Any help in this regard will be appreciated.

Thanks !!
 
Amber Vaidya
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think I got it ..
Tried this out



and it seems to be working fine.

Please let me know incase anyone sees any problem with this approach.

Thanks !!
 
author & internet detective
Posts: 41915
910
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Amber,
That approach is the one recommended by Ask Tom of Oracle.
 
reply
    Bookmark Topic Watch Topic
  • New Topic