Jumat, 29 Januari 2016

[MS_AccessPros] Query the most recent date!

 

I have a Query that I only want to show the most recent date for each employee record.  I have tried in the GroupBy field.... Max(License_Cert.Cert_Expire_Date) but that does not limit the records. Is there some other way to limit the query records to the most recent date?


SELECT License_Cert.[Emp#], License_Cert.Cert_Date, License_Cert.Cert_Title, License_Cert.Cert_NO, License_Cert.Issuing_Authority, Year([Cert_Date]) AS [YEAR], [First_Name] & ' ' & [Last_Name] AS Name, Max(License_Cert.Cert_Expire_Date) AS MaxOfCert_Expire_Date
FROM License_Cert INNER JOIN dbo_EMPLOYEE ON License_Cert.[EMP#] = dbo_EMPLOYEE.ID
GROUP BY License_Cert.[Emp#], License_Cert.Cert_Date, License_Cert.Cert_Title, License_Cert.Cert_NO, License_Cert.Issuing_Authority, Year([Cert_Date]), [First_Name] & ' ' & [Last_Name]
HAVING (((License_Cert.[Emp#]) Like "*" & [Enter Employee Number:] & "*") AND ((License_Cert.Cert_Title) Like "*" & [Enter Cert Title:] & "*"));

Thanks for your help and insights on this!
Rohn

__._,_.___

Posted by: reverson@maintainer.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

.

__,_._,___

Tidak ada komentar:

Posting Komentar