Skip to content
Advertisement

How can I determined which users with a specific RoleID that’s not been active within a time interval? And which home department do they belong to?

This script below will tell me how many non active users with a certain RoleID there’s been within a timeframe. When I run the script below. It will also tell me which home department each user belongs to.

This second script is a INNER JOIN where I can determine which DefaultDepartmentId (HomeDepartment) it belongs to to. For instance DefaultDepartmentID = 1 is named Testdepartment in table tbl_Departments. The relationship here between the two tables is DepartmentID.

After running this script. I can figure which DefaultDepartmentID it belongs to, for instance that DefaultDepartmentId=3 is named Testdepartment2

So my question is, how can I Integrate these to queries together? Thanks in advance.

Advertisement

Answer

Do the JOIN :

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement