M
Michel Walsh
You can rank in multiple ways, MS SQL Server 2005 has even an SQL
construction just for it. With Jet, using joins, that can be:
SELECT a.f1, a.f2, a.f3, COUNT(*) AS rank
FROM myTable As a INNER JOIN myTable AS b
ON a.fieldToRank >= b.fieldToRank
GROUP BY a.f1, a.f2, a.f3
HAVING COUNT(*) BETWEEN 250 AND 259
with the HAVING clause taking only rank-positions from 250 to 259,
inclusively.
If fieldToRank has duplicated values, some ranks will be duplicated too,
like: 1, 2, 3, 3, 3, 6, 7, 8, ...
Hoping it may help,
Vanderghast, Access MVP
construction just for it. With Jet, using joins, that can be:
SELECT a.f1, a.f2, a.f3, COUNT(*) AS rank
FROM myTable As a INNER JOIN myTable AS b
ON a.fieldToRank >= b.fieldToRank
GROUP BY a.f1, a.f2, a.f3
HAVING COUNT(*) BETWEEN 250 AND 259
with the HAVING clause taking only rank-positions from 250 to 259,
inclusively.
If fieldToRank has duplicated values, some ranks will be duplicated too,
like: 1, 2, 3, 3, 3, 6, 7, 8, ...
Hoping it may help,
Vanderghast, Access MVP