[AccessD] Question

Shamil Salakhetdinov shamil at users.mns.ru
Mon Sep 19 02:18:59 CDT 2005


Hi All,

Here is a query, which selects rows 49,50 from Customers table assuming that
CustomerID is used for rows ordering:

SELECT * FROM
(SELECT TOP 2 * FROM
(SELECT TOP 50 * FROM Customers
ORDER BY CustomerID)
ORDER BY CustomerID DESC)
ORDER BY CustomerID

It works in MS Access 2000/XP/2003.

Does anybody knows/heard/...  do Google and other search engines use similar
simple queries (with additional central nested query with WHERE expression
of course) when end-user moves between pages of selected search results? Or
they use saved search rows' IDs because with dynamic requery as in the query
above search results may change and because they allow to search within
results of the previous search?

My humble guess they use this simple and very well scalable solution.

What is your opinion?

Thank you,
Shamil

P.S. Credits to: http://www.richardxin.com/SQLPaging.aspx





More information about the AccessD mailing list