Link to home
Start Free TrialLog in
Avatar of wlwebb
wlwebbFlag for United States of America

asked on

Access - Get latest DateAuthorized for each Emp_ID

Hello all

I am attempting to define a Many to Many table link and get a query of the latest DateAuthorized for each employee.

I've tried Last, Max etc.  but I really can't grasp it.

SELECT Link_EmpToActAuthLevel.Emp_ID, Link_EmpToActAuthLevel.ActAuthLevelID, Link_EmpToActAuthLevel.DateAuthorized, Link_EmpToActAuthLevel.LinkEmpToActAuthLevelID, qry_Employees.EmpFullName, qry_Employees.EmpFullNickname, ActivityAuthorizationLevel.ActAuthLevel
FROM ActivityAuthorizationLevel INNER JOIN (Link_EmpToActAuthLevel INNER JOIN qry_Employees ON Link_EmpToActAuthLevel.Emp_ID = qry_Employees.EmpID) ON ActivityAuthorizationLevel.ActAuthLevelID = Link_EmpToActAuthLevel.ActAuthLevelID
GROUP BY Link_EmpToActAuthLevel.Emp_ID, Link_EmpToActAuthLevel.ActAuthLevelID, Link_EmpToActAuthLevel.DateAuthorized, Link_EmpToActAuthLevel.LinkEmpToActAuthLevelID, qry_Employees.EmpFullName, qry_Employees.EmpFullNickname, ActivityAuthorizationLevel.ActAuthLevel;

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wlwebb

ASKER

Thank you mbiz.... I really struggle with those subqueries.