G
Guest
I have a table with an employee id and check date. The table is a SQL Server
2000 table.
I'd like to return the last check date for each employee through a
user-defined range.
For example, if the table contains the following records:
Employee ID Check Date
ABC0001 1/31/2006
ABC0001 2/28/2006
ABC0001 3/31/2006
DEF0002 1/31/2006
DEF0002 3/31/2006
I'd like to enter a date, like 2/28/2006, and have the query return the
following records:
ABC0001 2/28/2006
DEF0002 1/31/2006
I have a query with Group By for Employee ID and Max for the date. The query
Access is generating is:
SELECT tblTest.EmployeeID, Max(tblTest.CheckDate) AS MaxOfCheckDate
FROM tblTest
GROUP BY tblTest.EmployeeID
HAVING (((Max(tblTest.CheckDate))<=#2/28/2006#));
The results are no records.
What am I doing wrong?
Thank you.
2000 table.
I'd like to return the last check date for each employee through a
user-defined range.
For example, if the table contains the following records:
Employee ID Check Date
ABC0001 1/31/2006
ABC0001 2/28/2006
ABC0001 3/31/2006
DEF0002 1/31/2006
DEF0002 3/31/2006
I'd like to enter a date, like 2/28/2006, and have the query return the
following records:
ABC0001 2/28/2006
DEF0002 1/31/2006
I have a query with Group By for Employee ID and Max for the date. The query
Access is generating is:
SELECT tblTest.EmployeeID, Max(tblTest.CheckDate) AS MaxOfCheckDate
FROM tblTest
GROUP BY tblTest.EmployeeID
HAVING (((Max(tblTest.CheckDate))<=#2/28/2006#));
The results are no records.
What am I doing wrong?
Thank you.