By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,166 Members | 1,775 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,166 IT Pros & Developers. It's quick & easy.

Query to select latest date among several

P: n/a
I have a query that returns this recordset:
Bob, 1/1/2000
Bob, 3/1/2001
Bob, 2/4/2004
Bob, 5/9/2002

I need the query to return this instead:
Bob, 2/4/2004

So, it needs to return the most recent date in records that otherwise
have repeating data.

Thanks for any tips!
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Group By Name and select Max of Date
"John" <so*********@hotmail.com> wrote in message
news:90**************************@posting.google.c om...
I have a query that returns this recordset:
Bob, 1/1/2000
Bob, 3/1/2001
Bob, 2/4/2004
Bob, 5/9/2002

I need the query to return this instead:
Bob, 2/4/2004

So, it needs to return the most recent date in records that otherwise
have repeating data.

Thanks for any tips!

Nov 13 '05 #2

P: n/a
Thanks Adrian; however, I thought I'd be able to figure out a more
complex problem by making it simpler. What if there's a third field
that makes the record unique. Example
Bob, 1/1/2000, $19.98
Bob, 3/1/2001, $24.98
Bob, 2/4/2004, $29.98
Bob, 5/9/2002, $26.98

The query still needs to return the most recently dated record:
Bob, 5/9/2002, $26.98

Using MAX on the date field still returns multiple records due to the
price field making them unique. Any suggestions?

"Adrian Tofan" <x@x.x> wrote in message news:<tH*********************@twister01.bloor.is.n et.cable.rogers.com>...
Group By Name and select Max of Date
"John" <so*********@hotmail.com> wrote in message
news:90**************************@posting.google.c om...
I have a query that returns this recordset:
Bob, 1/1/2000
Bob, 3/1/2001
Bob, 2/4/2004
Bob, 5/9/2002

I need the query to return this instead:
Bob, 2/4/2004

So, it needs to return the most recent date in records that otherwise
have repeating data.

Thanks for any tips!

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.