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

To return highest issue letter within a group 1

Status
Not open for further replies.

ugly

Programmer
Joined
Jul 5, 2002
Messages
70
Location
GB
My table consists of two fields, doc and issue. The data looks like-

Doc101, A
Doc102, A
Doc102, B
Doc103, A
Doc103, B
Doc103, C
Doc103, D

I am trying to construct a query that returns the highest letter issue for each doc group. So in the case of the above data my query would return

Doc101, A
Doc102, B
Doc103, D
Thanks for any help here
 
How about:

[tt]SELECT Table1.Doc, Max(Table1.Issue) AS MaxOfIssue
FROM Table1
GROUP BY Table1.Doc;[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top