Using a TOP 10 query. Next 10

casey

Registered User.
Local time
Today, 20:25
Joined
Dec 5, 2000
Messages
448
Hello,

If I use a TOP 10 query to get the top 10 results from a table, can I somehow retrieve the next 10 results in the list w/o too much trouble? I could count the records and then use a TOP "whatever" percent, I think. Is there any easier way to do this? I can't seem to find the answer.
Thanks.
 
try a query like this by using two sub queries in which you do the restrictions.
Code:
SELECT
  T0.YourSortedField
FROM
  [SELECT TOP 10
    T1.YourSortedField
  FROM
    [SELECT TOP 20
      T2.YourSortedField
    FROM YourTable AS T2
    ORDER BY T2.YourSortedField]. AS T1
  ORDER BY T1.YourSortedField DESC]. AS T0
ORDER BY T0.YourSortedField
 
Thanks for the help, Nouba.

It's amazing the level of complexity that can be applied to SQL. Pretty Smart.

I should be able to get it to work from here.
 

Users who are viewing this thread

Back
Top Bottom