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

Query has duplicate values in same field 1

Status
Not open for further replies.

Birddog

Programmer
May 30, 2001
15
0
0
US
My query looks at ID numbers and dates. I need to find the latest date for each ID number.

Sample data:

IdNum Date
123 12/31/2001
123 03/31/2003
354 06/30/2002
654 09/30/2001
654 06/30/2003

I am also querying other fields from a table. Unique Values and Unique Records properties do not seem to help.

I really need the max date for each unique IdNum but my queries keep returning multiple records with the same IdNum value.

Any help would be appreciated.
 
Try
Code:
   Select IdNum, Max([Date]) As MaxDate
   From tbl
   Group By IdNum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top