Find latest record

G

Guest

I have built a query which has lots of information based on the same ID. THis
ID can have reads taken on it at any time and therefore the table I have has
many records all with the same ID but with a date saying the latest read.
Is it possible to only select the latest read date within each Serial ID as
this will cut down my list to about 700 as opposed to 19000.
Many Thanks,
Matt
 
G

Guest

You can try something like

Select T1.* From TableName As T1 Where T1.DateFieldName In (Select Top 1
T2.DateFieldName From TableName As T2 Where T2.[Serial ID] = T1.[Serial ID]
Order By DateFieldName Desc)
 

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