‎08-08-2017 04:56 PM
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,
tblVolume.Name As VolumeName,
tblVolume.DriveLetter As DriveLetter,
tblVolume.Label As LogicalDiskName,
Case tblVolume.DriveType When 0 Then 'Unknown' When 1 Then 'No Root Directory'
When 2 Then 'Removable Disk' When 3 Then 'Local Disk'
When 4 Then 'Network Drive' When 5 Then 'Compact Disk' Else 'RAM Disk'
End As DriveType,
Cast(tblVolume.FreeSpace / 1024 / 1024 / 1024 As numeric) As FreeGB,
Cast(tblVolume.Capacity / 1024 / 1024 / 1024 As numeric) As TotalSizeGB,
tblVolume.Automount,
tblVolume.BlockSize,
tblVolume.Compressed,
tblVolume.DeviceID,
tblVolume.DirtyBitSet,
tblVolume.ErrorCleared,
tblVolume.ErrorDescription,
tblVolume.ErrorMethodology,
tblVolume.FileSystem,
tblVolume.IndexingEnabled,
tblVolume.PageFilePresent,
tblVolume.SupportsDiskQuotas,
tblVolume.SupportsFileBasedCompression,
tblVolume.Lastchanged
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblVolume On tblAssets.AssetID = tblVolume.AssetID
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Left Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblState On tblState.State = tblAssetCustom.State
Where tblState.Statename = 'Active'
Order By tblAssets.Domain,
tblAssets.AssetName,
VolumeName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now