→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎03-01-2018 11:23 AM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblADComputers.Description,
TsysChassisTypes.ChassisName,
tblOperatingsystem.Caption As OS,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
(Case
When tsysIPLocations.IPLocation Is Not Null Then tsysIPLocations.IPLocation
Else 'Undefined' End) As IPLocation
From tblAssets
Inner Join tblAssetCustom On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tblADComputers On tblADComputers.AssetID = tblAssets.AssetID
Inner Join tblSystemEnclosure On tblSystemEnclosure.AssetID =
tblAssets.AssetID
Inner Join TsysChassisTypes On TsysChassisTypes.Chassistype =
tblSystemEnclosure.ChassisTypes
Inner Join tblOperatingsystem On tblOperatingsystem.AssetID =
tblAssets.AssetID
Left Join tsysIPLocations On tblAssets.IPNumeric >= tsysIPLocations.StartIP
And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where (TsysChassisTypes.ChassisName = 'Laptop' Or TsysChassisTypes.ChassisName =
'Notebook' Or TsysChassisTypes.ChassisName = 'Portable' Or
TsysChassisTypes.ChassisName = 'Convertible') And
Not tblSoftwareUni.softwareName = 'Sophos SafeGuard Client%' And
tblAssetCustom.State = 1
Order By tblAssets.AssetName
‎03-01-2018 07:09 PM
Select Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
tblADComputers.Description,
TsysChassisTypes.ChassisName,
tblOperatingsystem.Caption AS OS,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssets.IPAddress,
Case
When tsysIPLocations.IPLocation Is Not Null
Then tsysIPLocations.IPLocation
Else 'Undefined'
End As IPLocation
From
tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Inner Join tblSystemEnclosure On tblAssets.AssetID = tblSystemEnclosure.AssetID
Inner Join tblOperatingsystem On tblAssets.AssetID = tblOperatingsystem.AssetID
Inner Join TsysChassisTypes On tblSystemEnclosure.ChassisTypes = TsysChassisTypes.Chassistype
Left Join tsysIPLocations On tblAssets.IPNumeric >= tsysIPLocations.StartIP And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Where
TsysChassisTypes.ChassisName In ('Laptop', 'Notebook', 'Portable', 'Convertible')
And tblAssetCustom.State = 1
And Not Exists (Select
tblSoftware.AssetID
From
tblSoftware
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where
tblSoftware.AssetID = tblAssets.AssetID
And tblSoftwareUni.softwareName Like 'Sophos SafeGuard Client%')
Order By
tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now