Limit query without using TOP

  • Thread starter Thread starter DeDBlanK
  • Start date Start date
D

DeDBlanK

Hello,
NooB posting, so forgive me if I don't get everything correct.
I am trying to run a query that calls the TOP 25 in access 2003.
The query calls two fields, SumOfTotal and strDescription.

SELECT TOP 25 Query2.SumOfTotal, Query2.strDescription
FROM Query2
GROUP BY Query2.SumOfTotal, Query2.strDescription
ORDER BY Query2.SumOfTotal DESC;

I believe the problem is I recieve 26 records due to the total values
of the last few of the SumOfTotal records are all the same values.
Where in that the SumOfTotal have different values there is no
problems. All I need to do is limit the records to 25? Any
suggestions?
 
Add the other field to the ORDER BY clause as well.

That way, if there is a tie, Access can decide which one to return, instead
of returning both (the extra record.)
 
Thanks Allen. Just wanted to say that many of your posted solutions
have helped me more than you could possibly know. Thank you again for
being an advid benefactor to the world.
 
Back
Top