Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2004
    Posts
    4

    Unanswered: next 3 rows (3 to 7)

    How can I get the next 3 rows from a query ?

    1 to 3
    then
    4 to 7
    ect ....

    something like
    SELECT TOP (4 to 7) id FROM myTable ORDER BY id DESC

    will be great :-)

    thank you

  2. #2
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    How about this

    Code:
    SELECT TOP 3 [YourTable].ID AS ID
    FROM [SELECT  [YYourTable].ID
                             FROM [YourTable]
                              WHERE [YourTable].ID Not In
                                        (SELECT TOP 3 [YourTable].ID
                                              FROM [YourTable])]. AS [setlesstop3];
    this will work but i dont know if its thebest way to go about this

    HTH
    Dave

  3. #3
    Join Date
    Nov 2004
    Posts
    8
    Can you explain why you need to do this/what you're splitting it for?...

    Cheers

Posting Permissions

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