QUERING DATES

  • Thread starter Thread starter KATBILU
  • Start date Start date
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.
 
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)
 
This may get you started in the right direction:

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

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