var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Query Help Requested - Union?
I need to all user IDs where the users have 3 permissions which are in a table holding about 100 different permissions
I need to find the user IDs like I do below but somehow have all three in the WHERE clause (I guess? but this does not work)
SELECT employees.employeeID FROM employees INNER JOIN employeePermissions ON employees.employeeID = employeePermissions.EmployeeID
AND employeePermissions.PermissionID = 'PROJECT_VIEW_ALL'
AND employeePermissions.PermissionID = 'PROJECT_MODIFY'
employeePermissions.PermissionID = 'PROJECT_DELETE'
the Permissions table has an EmployeeID column and a PermissionID column(which holds the permission name)
This assumes that employeeID and PermissionID represent a unique key in the employeePermissions table:
where PermissionID in ('PROJECT_VIEW_ALL', 'PROJECT_MODIFY', 'PROJECT_DELETE')
group by EmployeeID
having count(*) = 3
Thank you very much. You're the greatest!