to get the last time and date

G

Guest

hi,

i need to get this last time and date only for each records,


Name id Duration Time/date
123 00:01:04.297 2005-11-03 13:53:36.903
123 00:03:04.297 2005-11-04 13:53:36.903
123 00:05:06.297 2005-11-05 13:53:36.903

i only want it to pull all the last records for each name id as below i only
want this one

Name id Duration Time/date
123 00:05:06.297 2005-11-05 13:53:36.903
 
M

Marshall Barton

TYE said:
i need to get this last time and date only for each records,

Name id Duration Time/date
123 00:01:04.297 2005-11-03 13:53:36.903
123 00:03:04.297 2005-11-04 13:53:36.903
123 00:05:06.297 2005-11-05 13:53:36.903

i only want it to pull all the last records for each name id as below i only
want this one

Name id Duration Time/date
123 00:05:06.297 2005-11-05 13:53:36.903


SELECT T.*
FROM table As T
WHERE T.datefield =
(SELECT Max(X.datefield)
FROM table As X
WHERE X.[Name ID] = T.[Name ID])
 

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

Top