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!

Maximum Date Value

Status
Not open for further replies.

aaw

Programmer
Joined
Dec 20, 2004
Messages
1
Location
US
I have a query which displays a set of date values for a particular ID. Is it possible to obtain a Maximum date from those date values for a particular ID.
So my current data for the query is e.g.
1 1/1/2000
1 6/2/2000
2 1/1/2001
2 4/1/2002 etc.

Is it possible to somehow get distinctly maximum date values
e.g.
1 6/2/2000
2 4/1/2002

Because I need to show not multiple records in my Report.

Thanks.
 
Code:
SELECT ID, Max(MyDate) AS MaxDate
FROM Table1
GROUP BY ID;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top