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

Lastest Unique Record

Status
Not open for further replies.

jimoo

Programmer
Joined
Jun 2, 2003
Messages
1,111
Location
US
I am trying get the most latest record from a group of records. The latest is based on the renewalDate

Sample Data
Code:
person  renewNumber     RenewDate
1       AAAA            01/01/1999
1       BBBB            01/01/2000
1       CCCC            01/01/2001
2       FFFF            01/01/1999
2       GGGG            01/01/2000
3       LLLL            01/01/1999
3       MMMM            01/01/2000
3       NNNN            01/01/2001
3       OOOO            01/01/2002
3       PPPP            01/01/2003

Person 1 exists 3 times
Person 2 exists 2 times
Person 3 exists 5 times

I want there latest renewal numbers so the results I am looking for is:

Code:
1       CCCC            01/01/2001
2       GGGG            01/01/2000
3       PPPP            01/01/2003


Jim
 
Do an aggregate on person for max date

djj
The Lord is My Shepard (Psalm 23) - I need someone to lead me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top