
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2011 12:48 PM
Hi,
Is there any way to amend this report to only show the last time the user logged on. In its current format its showing multiple records for each individual user.
Select maxlogon.Latest, tblADusers.Name, tblADusers.Description,
tblADusers.Office, tblADusers.Department
From (Select tblCPlogoninfo.Computername, tblCPlogoninfo.Domain,
tblCPlogoninfo.Username, Max(tblCPlogoninfo.logontime) As Latest
From tblCPlogoninfo
Group By tblCPlogoninfo.Computername, tblCPlogoninfo.Domain,
tblCPlogoninfo.Username) maxlogon Inner Join
tblADusers On maxlogon.Domain = tblADusers.Userdomain And maxlogon.Username =
tblADusers.Username
Order By tblADusers.Name
Many Thanks
Kevin
Is there any way to amend this report to only show the last time the user logged on. In its current format its showing multiple records for each individual user.
Select maxlogon.Latest, tblADusers.Name, tblADusers.Description,
tblADusers.Office, tblADusers.Department
From (Select tblCPlogoninfo.Computername, tblCPlogoninfo.Domain,
tblCPlogoninfo.Username, Max(tblCPlogoninfo.logontime) As Latest
From tblCPlogoninfo
Group By tblCPlogoninfo.Computername, tblCPlogoninfo.Domain,
tblCPlogoninfo.Username) maxlogon Inner Join
tblADusers On maxlogon.Domain = tblADusers.Userdomain And maxlogon.Username =
tblADusers.Username
Order By tblADusers.Name
Many Thanks
Kevin
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2011 10:05 AM
try this
Select maxlogon.Latest, tblADusers.Name, tblADusers.Description,
tblADusers.Office, tblADusers.Department, maxlogon.Domain, maxlogon.Username
From (Select tblCPlogoninfo.Domain, tblCPlogoninfo.Username,
Max(tblCPlogoninfo.logontime) As Latest
From tblCPlogoninfo
Group By tblCPlogoninfo.Domain, tblCPlogoninfo.Username) maxlogon Inner Join
tblADusers On maxlogon.Domain = tblADusers.Userdomain And maxlogon.Username =
tblADusers.Username
Order By tblADusers.Name
