QUERING DATES

K

KATBILU

In quering dates, how do I retrieve items with the most
current date? For example, lets say I have 100 records
among 20 employees, how can I get the records for the
last entry among all 20 employees not entries from day
one or for a specific date.
 
S

Steve Schapel

Katbilu,

The SQL for such a query would look something like this...

SELECT OneField, AnotherField
FROM YourTable
WHERE TheDate In(SELECT Max([TheDate]) FROM YourTable)
 
K

Ken Snell [MVP]

This may get you started in the right direction:

SELECT EmployeeID, Max(DateFieldName)
FROM TableName
GROUP BY EmployeeID;
 
Top