pull the last comment

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

i have a list of comments and dates. i want to pull just
the last comment in the following example. Each person
has several records.

John Jones 123-34-6789 1/23/04
John Jones 123-34-6789 2/22/04
Sam Snead 145-65-6789 1/14/04
Sam Snead 145-65-6789 2/24/04

so i want to just pull the last records
john jones 2/22/04 and
sam snead 2/24/04

is this possible?
 
Yes it is

SELECT Name, Key, Max(Date) FROM Table GROUP BY Name, Date

This will give you the last Date for each person.

- Raoul
 
Correction :-(

SELECT Name, Key, Max(Date) FROM Table GROUP BY Name, Key

- Raoul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top