Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

list only the top 10 records?

Status
Not open for further replies.

Spyder757

Technical User
Aug 29, 2002
129
US
Is it possible to list just the top 10 highest percentages in a query?.

I've tried using that little drop down that appears in the query to limit it to just 10 records but the records that are returned aren't the top 10 but appear to be an average?

Spyder757
 
Are you getting 10 records? "Top 10" means the first 10 records, it doesn't mean the highest (or lowest) valued 10.
Use an ORDER BY clause like

Order By Amount DESC

And that will give you the 10 records with the highest value for the "Amount" field.
 
In the query designer, select "Ascending" or "Decending" for the sort in the fields that you want sorted. If you're into manually creating SQL then select SQL view and add a clause at the end of the generated SQL (but before the ;) that says

Order By Field1, Field2, ...

You may specify FieldName ASC for an ascending sort or
FieldName DESC for a descending sort

ASC is the default if you don't specify anything.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top