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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Largest Value Query

Status
Not open for further replies.

Lauren36

MIS
Apr 23, 2002
11
US
I know that this is probably a very simple thing, but I need help writing a query that will find the largest numeric value in a field. Thankyou in advance for the help.
 
In the query design window click on view->totals. In the total box for the field you need select Max. All the other columns will be set to Group By by default. If you have other numerical columns you'll need to select something meaningful (min, sum, avg etc). Good Luck,
Mike T
 
When I did this it only put the values in ascending order and I only wanted the record with the maximum value. What am I doing wrong?
 
If you only want a single value then get rid of all the columns you don't need. If some of those columns have criteria change the total from group by to where.

Good Luck,
Mike T
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top