Display most current entry

E

EricaLRivera

Hey Y'all,

I have a database with only 2 tables. An attendance table and a
department table. The department table is simply a look up table. I
want to pull the most current entry into the attendance table and the
text associated with it. I can get the correct department and date but
as soon as I add the text to this field, I get multiple entries
displaying again. Can anyone help me? This is what my code looks
like...


SELECT Attendance.Department, Attendance.DateChanged
FROM OldestDate INNER JOIN Attendance ON
(OldestDate.Department=Attendance.Department) AND
(OldestDate.MaxOfDateChanged=Attendance.DateChanged)
GROUP BY Attendance.Department, Attendance.DateChanged
ORDER BY Attendance.DateChanged DESC;


Any help would be deeply appreciated!
Thanks
Erica
 
Top