Hi, Im trying to run a report to find when users last logged on and to also include users who have an account in AD but who have NEVER logged on. When I run the below report I can see users and their last logon time, but it doesnt show me the user accounts who never logged on.
Select Top 1000000 tblADusers.Firstname,
tblADusers.Lastname,
tblADusers.Username,
tblADusers.Office,
tblADusers.Department,
tblADusers.Description,
tblADusers.email,
maxlogon.Latest,
tblADusers.Mobile,
tblADusers.whenCreated,
tblADusers.Company
From (Select upgrade_tblCPlogoninfo.Domain,
upgrade_tblCPlogoninfo.Username,
Max(upgrade_tblCPlogoninfo.logontime) As Latest
From upgrade_tblCPlogoninfo
Group By upgrade_tblCPlogoninfo.Domain,
upgrade_tblCPlogoninfo.Username) maxlogon
Inner Join tblADusers On maxlogon.Domain = tblADusers.Userdomain And
maxlogon.Username = tblADusers.Username
What do i need to add to this to include the users who have never logged on?
Many Thanks,
Kevin.