→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
02-13-2015 10:25 PM
Solved! Go to Solution.
02-16-2015 01:39 PM
Select Top 1000000 tsysIPLocations.IPLocation,
tType.Type,
Count(tblAssets.AssetID) As Number
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tsysIPLocations
On tblAssets.IPNumeric Between tsysIPLocations.StartIP And
tsysIPLocations.EndIP
Inner Join (Select tblComputersystem.AssetID,
Case When tblAssets.AssetID In (Select tblPortableBattery.AssetID
From tblPortableBattery) Then 'Laptop' Else Case
When tblComputersystem.Domainrole > 1 Then 'Server' Else 'Desktop' End
End As Type
From tblAssets
Inner Join tblComputersystem
On tblAssets.AssetID = tblComputersystem.AssetID) tType
On tType.AssetID = tblAssets.AssetID
Where tblAssetCustom.State = 1
Group By tsysIPLocations.IPLocation,
tType.Type
02-18-2015 11:23 PM
02-16-2015 01:39 PM
Select Top 1000000 tsysIPLocations.IPLocation,
tType.Type,
Count(tblAssets.AssetID) As Number
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tsysIPLocations
On tblAssets.IPNumeric Between tsysIPLocations.StartIP And
tsysIPLocations.EndIP
Inner Join (Select tblComputersystem.AssetID,
Case When tblAssets.AssetID In (Select tblPortableBattery.AssetID
From tblPortableBattery) Then 'Laptop' Else Case
When tblComputersystem.Domainrole > 1 Then 'Server' Else 'Desktop' End
End As Type
From tblAssets
Inner Join tblComputersystem
On tblAssets.AssetID = tblComputersystem.AssetID) tType
On tType.AssetID = tblAssets.AssetID
Where tblAssetCustom.State = 1
Group By tsysIPLocations.IPLocation,
tType.Type
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now