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;






 
					

0 Comments:
Post a Comment
<< Home