‎05-10-2022 12:49 PM
Select Top 1000000 Coalesce(os.Image, at.AssetTypeIcon10) As Icon,
a.AssetID,
a.AssetName,
Case
When Coalesce(adc.IsEnabled, 0) = 0 Then 'False'
Else 'True'
End As EnabledInAD,
at.AssetTypename As Type,
a.Domain,
a.Username,
a.Userdomain,
a.IPAddress,
a.Description,
ac.Manufacturer,
ac.Model,
Case (a.Assettype)
When -1 Then os.OSname
When 11 Then ls.OSRelease
When 13 Then mi.SystemVersion
Else ''''
End As OS,
a.SP As SP,
ac.Location,
tsysIPLocations.IPLocation,
a.Firstseen,
a.Lastseen
From tblAssets a
Inner Join tblADComputers adc On a.AssetID = adc.AssetID
Inner Join tblAssetCustom ac On a.AssetID = ac.AssetID
Inner Join tsysAssetTypes at On at.AssetType = a.Assettype
Inner Join tblState s On s.State = ac.State
Left Join tsysOS os On a.OScode = os.OScode
Left Join tblLinuxSystem ls On ls.AssetID = a.AssetID
Left Join tblMacOSInfo mi On mi.AssetID = a.AssetID
Left Outer Join tsysIPLocations On a.LocationID = tsysIPLocations.LocationID
Where s.Statename = 'Active'
Order By adc.IsEnabled Desc,
a.Assettype,
a.AssetName
‎05-27-2022 12:39 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now