Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2007
    Posts
    13

    Unanswered: Taking specific number of rows from the database

    Hi

    I have a pervasive.sql database, and i want to select, using the sql command
    only a seeral rows, lets say i want to take the 25# - 30# rows, how can i do that ?

    What i found is the command TOP but its not good because its always starts
    from the beginning, and i want to take lets say from the middle, from the x row to the y row.

    Can i do that ?

    Thanks.

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    You might be able to take the top 30 rows within a subquery, sort the results in DESC order, then select the top 5 from the subquery & finally sort THAT in descending order again... (to get the results you need)
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Posting Permissions

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