→ The Lansweeper Customer Excellence Awards 2024 - Submit Your Project Now! Learn More & Enter Here
‎11-20-2014 10:38 AM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tsysOS.OSname As OS,
tblAssets.SP,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblBattery.DeviceID,
tblBattery.Name,
Case tblBattery.Availability When 1 Then 'Other' When 2 Then 'Unknown'
When 3 Then 'Running or Full Power' When 4 Then 'Warning'
When 5 Then 'In Test' When 6 Then 'Not Applicable' When 7 Then 'Power Off'
When 8 Then 'Off Line' When 9 Then 'Off Duty' When 10 Then 'Degraded'
When 11 Then 'Not Installed' When 12 Then 'Install Error'
When 13 Then 'Power Save - Unknown' When 14 Then 'Power Save - Low Power'
When 15 Then 'Power Save - Standby' When 16 Then 'Power Cycle'
When 17 Then 'Power Save - Warning' Else '' End As Availability,
tblBattery.SmartBatteryVersion,
Case tblBattery.BatteryStatus When 1 Then 'Charging'
When 2 Then 'System On AC' When 3 Then 'Fully Charged' When 4 Then 'Low'
When 5 Then 'Critical' When 6 Then 'Charging'
When 7 Then 'Charging and High' When 8 Then 'Charging and Low'
When 9 Then 'Charging and Critical' When 10 Then 'Undefined'
When 11 Then 'Partially Charged' Else '' End As BatteryStatus,
Case tblBattery.Chemistry When 1 Then 'Other' When 2 Then 'Unknown'
When 3 Then 'Lead Acid' When 4 Then 'Nickel Cadmium'
When 5 Then 'Nickel Metal Hydride' When 6 Then 'Lithium-ion'
When 7 Then 'Zinc air' When 8 Then 'Lithium Polymer' Else ''
End As Chemistry,
tblBattery.Lastchanged
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Inner Join tblState On tblState.State = tblAssetCustom.State
Inner Join tblBattery On tblAssets.AssetID = tblBattery.AssetID
Left Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where tblState.Statename = 'Active'
Order By tblAssets.Domain,
tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now