sorting records by most recent entry

S

Sarah

My database includes multiple records for many people. I am trying to
sort/query the database so that it provides me with only the most recent
entry for each person but am unsure how to do this.
 
O

Ofer Cohen

If the last entry is defined by a date field, try something like

Select T1.Person , T1.DateField From TableName as T1
Where T1.DateField In (Select Top 1 T2.DateField From TableName As T2
Where T2.Person = T1.Person Order By T2.DateField Desc)
 
Top