→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎07-27-2016 03:19 PM
‎07-29-2016 01:04 PM
‎07-27-2016 10:19 PM
Also, the 1000000 results I get back are all from the Lansweeper server, how do i choose not to include this ...
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblADusers.Name,
tblADusers.Department,
tblADusers.Mobile,
tblAssetCustom.Model,
(Select (Case When Exists(Select 1
From tblADMembership Inner Join tblADGroups On tblADGroups.ADObjectID =
tblADMembership.ParentAdObjectID
Where tblADMembership.ChildAdObjectID = tblADusers.ADObjectID And
tblADGroups.Name = 'Domain Admins') Then 'True' Else 'False'
End)) As GroupMembership,
(Select (Case When Exists(Select 1
From tblSoftware Inner Join tblSoftwareUni On tblSoftwareUni.SoftID =
tblSoftware.softID
Where tblSoftware.AssetID = tblAssets.AssetID And
tblSoftwareUni.softwareName Like '%Java 8%') Then 'True' Else 'False'
End)) As SoftwareInstalled
From tblAssets
Inner Join tblAssetCustom On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tblADusers On tblADusers.Userdomain = tblAssets.Userdomain And
tblADusers.Username = tblAssets.Username
Where tblAssetCustom.State = 1
Order By tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now