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

GET LARGEST DATE SQL, ADO 1

Status
Not open for further replies.

pelagic

Programmer
Nov 7, 2002
97
US
How do I write an SQL query or ADO query from this table (Table1)

SERIALNO TESTDATE
391 12/2/2005
391 7/2/2003
902 9/8/2003
3415 11/1/2005
3415 11/1/2005
3536 11/1/2005
3536 11/1/2005
3836 11/10/2005
3836 10/25/2005

Result after query
SERIALNO TESTDATE
391 12/2/2005
902 9/8/2003
3415 11/1/2005
3536 11/1/2005
3836 11/10/2005

Thanks,
 
SELECT SERIALNO, Max(TESTDATE) AS LargestDate
FROM Table1
GROUP BY SERIALNO

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top