The SQL below displays an employee count for 14 branches.
What I'd like to do is keep the individual counts for branches 1 through 11 but have branch 12 be the sum of branch 12, 13, 14.
SELECT COUNT(Employees .EmployeeID) AS Count_EmployeeI D, Branches.Branch es, UserInRole.User RoleID
FROM dbo.Employees, dbo.Branches, dbo.UserInRole
WHERE dbo.Employees.B ranchID = dbo.Branches.Br anchID
AND dbo.Employees.U serRoleID = dbo.UserInRole. UserRoleID
GROUP BY Branches.Branch es, UserInRole.User RoleID
HAVING (UserInRole.Use rRoleID = '1')
Thanks for your help.
James
What I'd like to do is keep the individual counts for branches 1 through 11 but have branch 12 be the sum of branch 12, 13, 14.
SELECT COUNT(Employees .EmployeeID) AS Count_EmployeeI D, Branches.Branch es, UserInRole.User RoleID
FROM dbo.Employees, dbo.Branches, dbo.UserInRole
WHERE dbo.Employees.B ranchID = dbo.Branches.Br anchID
AND dbo.Employees.U serRoleID = dbo.UserInRole. UserRoleID
GROUP BY Branches.Branch es, UserInRole.User RoleID
HAVING (UserInRole.Use rRoleID = '1')
Thanks for your help.
James
Comment