Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004
    Posts
    1

    Unanswered: How to fetch records rangewise in Sybase?

    Hi,

    I will be fetching say 1000 records from a table pagewise..like every page will show 25 records.
    e.g.1st page will show records from 1 to 25
    2nd page will show records from 26 to 50
    & so on.

    I dont wantto use temporary tables.

    Can anybody help?

    Thanks in advance.

    Regards,
    Ameeta

  2. #2
    Join Date
    Nov 2002
    Posts
    207
    Assumptions...

    1. You are using a frontend application.
    2. You will be calling a SP to get the data.

    Call SP for the first time and SP will return 1-25 rows.
    Call SP 2nd time and pass the unique key from 25th row as parameter and SP will return rows > unique key, i.e. 26-50 rows.
    Call SP 3rd time and pass the unique key from 50th row as parameter and SP will return rows > unique key, i.e. 51-100 rows.
    and so on...

  3. #3
    Join Date
    Mar 2001
    Location
    Lexington, KY
    Posts
    606
    Thanks,

    Matt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •