cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dteague
Engaged Sweeper III
Somehow I have deleted this report. Can someone provide me with the SQL so I can add back this report?

Thanks!
1 ACCEPTED SOLUTION
Susan_A
Lansweeper Alumni
Just an FYI for everyone: all built-in reports can now be found in the report center.

View solution in original post

3 REPLIES 3
Susan_A
Lansweeper Alumni
Just an FYI for everyone: all built-in reports can now be found in the report center.
dteague
Engaged Sweeper III
Thanks!
Hemoco
Lansweeper Alumni
You may use the details provided below to recreate the specified report.


View name
duplicateSID

Report name
Computer: Duplicate SID


SQL code

Select Top 1000000 tblComputers.Computername, tblComputers.ComputerUnique, tblComputers.Domain, Web40OSName.OSname As OS, tblOperatingsystem.Description, tblUsers.SID, Duplicates.Total, tblComputers.Lastseen, Web40OSName.Compimage As icon From tblComputers Inner Join tblUsers On tblComputers.Computername = tblUsers.Computername Inner Join web40ActiveComputers On web40ActiveComputers.Computername = tblComputers.Computername Inner Join (Select Top 1000000 tblUsers.SID, Count(tblUsers.UserID) As Total From tblComputers Inner Join tblUsers On tblComputers.Computername = tblUsers.Computername Inner Join web40ActiveComputers On web40ActiveComputers.Computername = tblComputers.Computername Group By tblUsers.SID Having tblUsers.SID Like '%-500' And Count(tblUsers.UserID) > 1) Duplicates On tblUsers.SID = Duplicates.SID Inner Join tblOperatingsystem On tblComputers.Computername = tblOperatingsystem.Computername Inner Join Web40OSName On Web40OSName.Computername = tblComputers.Computername Order By Duplicates.Total Desc, tblUsers.SID, dbo.tblComputers.Computer