‎07-10-2014 07:51 PM
Select Top 1000000 tsysAssetTypes.AssetTypeIcon16 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblEncryptableVolume.DriveLetter,
Case When tblEncryptableVolume.ProtectionStatus = 0 Then 'OFF'
When tblEncryptableVolume.ProtectionStatus = 1 Then 'ON' Else 'UNKNOWN'
End As ProtectionStatus,
tblEncryptableVolume.LastChanged,
TsysChassisTypes.Chassistype,
TsysChassisTypes.ChassisName
From tblEncryptableVolume
Inner Join tblAssets On tblEncryptableVolume.AssetId = tblAssets.AssetID
Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
Inner Join TsysChassisTypes On TsysChassisTypes.ChassisName = tblAssets.OScode
Where (TsysChassisTypes.Chassistype = 8 Or TsysChassisTypes.Chassistype = 9 Or
TsysChassisTypes.Chassistype = 10) And tblAssets.Lastseen <> '' And
tblAssets.Assettype = -1
Solved! Go to Solution.
‎07-11-2014 12:06 AM
CASE WHEN tblPortableBattery.AssetID IS NULL
THEN 'desktop'
ELSE 'notebook'
END
SELECT Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 AS icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblEncryptableVolume.DriveLetter,
CASE WHEN tblEncryptableVolume.ProtectionStatus = 0 THEN 'OFF'
WHEN tblEncryptableVolume.ProtectionStatus = 1 THEN 'ON'
ELSE 'UNKNOWN'
END AS ProtectionStatus,
tblEncryptableVolume.LastChanged,
TsysChassisTypes.ChassisName,
CASE WHEN tblPortableBattery.AssetID IS NULL
THEN 'desktop'
ELSE 'notebook'
END AS Classification
FROM
tblAssets
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
INNER JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
INNER JOIN tblEncryptableVolume ON tblAssets.AssetID = tblEncryptableVolume.AssetId
INNER JOIN tblSystemEnclosure ON tblAssets.AssetID = tblSystemEnclosure.AssetID
INNER JOIN TsysChassisTypes ON tblSystemEnclosure.ChassisTypes = TsysChassisTypes.Chassistype
INNER JOIN tblPortableBattery ON tblAssets.AssetID = tblPortableBattery.AssetID
WHERE
tblAssetCustom.State = 1
AND tblAssets.Assettype = -1
AND tblAssets.Lastseen <> ''
ORDER BY
tblAssets.AssetName,
tblEncryptableVolume.DriveLetter
‎07-11-2014 12:06 AM
CASE WHEN tblPortableBattery.AssetID IS NULL
THEN 'desktop'
ELSE 'notebook'
END
SELECT Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 AS icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblEncryptableVolume.DriveLetter,
CASE WHEN tblEncryptableVolume.ProtectionStatus = 0 THEN 'OFF'
WHEN tblEncryptableVolume.ProtectionStatus = 1 THEN 'ON'
ELSE 'UNKNOWN'
END AS ProtectionStatus,
tblEncryptableVolume.LastChanged,
TsysChassisTypes.ChassisName,
CASE WHEN tblPortableBattery.AssetID IS NULL
THEN 'desktop'
ELSE 'notebook'
END AS Classification
FROM
tblAssets
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
INNER JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
INNER JOIN tblEncryptableVolume ON tblAssets.AssetID = tblEncryptableVolume.AssetId
INNER JOIN tblSystemEnclosure ON tblAssets.AssetID = tblSystemEnclosure.AssetID
INNER JOIN TsysChassisTypes ON tblSystemEnclosure.ChassisTypes = TsysChassisTypes.Chassistype
INNER JOIN tblPortableBattery ON tblAssets.AssetID = tblPortableBattery.AssetID
WHERE
tblAssetCustom.State = 1
AND tblAssets.Assettype = -1
AND tblAssets.Lastseen <> ''
ORDER BY
tblAssets.AssetName,
tblEncryptableVolume.DriveLetter
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now