AccessBlog.net

News, links, downloads, tips and tricks on Microsoft Access and related

About Me Search
Alex
Name:Alex Dybenko

Location:Moscow, Russia

Friday, June 18, 2010

Paging using Jet SQL

This trick I learned from A.D. Tejpal, Access MVP. Following SQL statement returns records 11 to 30  from Products table:

SELECT TOP 20 T.*
FROM Products AS T LEFT JOIN [SELECT TOP 10 Products.*
FROM Products ORDER BY ProductName]. AS Q ON T.ProductID = Q.ProductID
WHERE Q.ProductID Is Null
ORDER BY T.ProductName;

Labels: ,

0 Comments:

Post a Comment

<< Home