‎08-08-2017 06:42 PM
Select Top 1000000 htblteams.teamname As Team,
htblusers.name As Agent,
htblusers.username,
htblusers.userdomain,
htblusers.email As Email,
htblusers.mobile,
htblusers.telephone,
htblusers.company,
htblusers.department,
tsysLanguages.EnglishName As Language,
tsysRoles.Name As Role,
Case htblagents.active When 1 Then 'Yes' Else 'No' End As IsLicensed
From htblusers
Left Join tsysRoles On htblusers.Roleid = tsysRoles.RoleID
Inner Join htblagents On htblusers.userid = htblagents.userid
Inner Join tsysLanguages On tsysLanguages.LanguageId = htblusers.language
Left Join htblagentteam On htblagents.agentid = htblagentteam.agentid
Left Join htblteams On htblteams.teamid = htblagentteam.teamid
Where htblusers.name <> 'System'
Order By Team,
Agent
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now