?
Solved

Find Max Value MS Access 2003

Posted on 2011-02-16
2
Medium Priority
?
336 Views
Last Modified: 2012-05-11
I am trying to find the max value in the Current column using ms access.
Table
ID    Name    Current
1      A           1
1      B           23
1      C           12  
2      A            22
2      B            9

So my end result with be the following:
ID  Name Current
1    B        23
2    A        22
0
Comment
Question by:asarda
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 58

Expert Comment

by:cyberkiwi
ID: 34909961
select id, name, max(current) as maxcurrent
from tblname
group by id, name
0
 
LVL 58

Accepted Solution

by:
cyberkiwi earned 2000 total points
ID: 34910008
Fixed

select g.id, MIN(name) as [Name], g.[Current]
from
(
select id, max([current]) as [Current]
from tblname
group by id
) g inner join tblname t on t.id=g.id
where g.[Current] = t.[Current]
group by g.id, g.[Current]
0

Featured Post

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question