‎08-10-2015 04:26 PM
Solved! Go to Solution.
‎08-11-2015 01:40 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tblAssets.Lastseen,
tDiskspace.diskdrive,
tDiskspace.[used space (GB)]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join (Select tblDiskdrives.AssetID,
tblDiskdrives.Caption As diskdrive,
Cast(Cast(tblDiskdrives.Size - tblDiskdrives.Freespace As bigint) / 1024 /
1024 / 1024 As numeric) As [used space (GB)]
From tblDiskdrives
Where tblDiskdrives.DriveType = 3) tDiskspace On tDiskspace.AssetID =
tblAssets.AssetID
Where tDiskspace.[used space (GB)] >500 And tblAssetCustom.State = 1
Order By tblAssets.AssetName,
tDiskspace.diskdrive
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tblAssets.Lastseen,
tDiskspace.Filesystem,
tDiskspace.[used space (GB)]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join (Select tblLinuxHardDisks.AssetID,
tblLinuxHardDisks.Filesystem,
Cast(Case
When tblLinuxHardDisks.Used Like '%G' Then
Cast(Replace(Replace(tblLinuxHardDisks.Used, ',', '.'), 'G', '') As float)
When tblLinuxHardDisks.Used Like '%M' Then
Cast(Replace(Replace(tblLinuxHardDisks.Used, ',', '.'), 'M',
'') As float) / 1024
When tblLinuxHardDisks.Used Like '%K' Then
Cast(Replace(Replace(tblLinuxHardDisks.Used, ',', '.'), 'K',
'') As float) / 1024 / 1024
Else Cast(Replace(tblLinuxHardDisks.Used, ',', '.') As float)
End As decimal(25,3)) As [used space (GB)]
From tblLinuxHardDisks) tDiskspace On tDiskspace.AssetID = tblAssets.AssetID
Where tDiskspace.[used space (GB)] >500 And tblAssetCustom.State = 1
Order By tblAssets.AssetName,
tDiskspace.Filesystem
‎08-11-2015 01:40 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tblAssets.Lastseen,
tDiskspace.diskdrive,
tDiskspace.[used space (GB)]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join (Select tblDiskdrives.AssetID,
tblDiskdrives.Caption As diskdrive,
Cast(Cast(tblDiskdrives.Size - tblDiskdrives.Freespace As bigint) / 1024 /
1024 / 1024 As numeric) As [used space (GB)]
From tblDiskdrives
Where tblDiskdrives.DriveType = 3) tDiskspace On tDiskspace.AssetID =
tblAssets.AssetID
Where tDiskspace.[used space (GB)] >500 And tblAssetCustom.State = 1
Order By tblAssets.AssetName,
tDiskspace.diskdrive
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tblAssets.Lastseen,
tDiskspace.Filesystem,
tDiskspace.[used space (GB)]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join (Select tblLinuxHardDisks.AssetID,
tblLinuxHardDisks.Filesystem,
Cast(Case
When tblLinuxHardDisks.Used Like '%G' Then
Cast(Replace(Replace(tblLinuxHardDisks.Used, ',', '.'), 'G', '') As float)
When tblLinuxHardDisks.Used Like '%M' Then
Cast(Replace(Replace(tblLinuxHardDisks.Used, ',', '.'), 'M',
'') As float) / 1024
When tblLinuxHardDisks.Used Like '%K' Then
Cast(Replace(Replace(tblLinuxHardDisks.Used, ',', '.'), 'K',
'') As float) / 1024 / 1024
Else Cast(Replace(tblLinuxHardDisks.Used, ',', '.') As float)
End As decimal(25,3)) As [used space (GB)]
From tblLinuxHardDisks) tDiskspace On tDiskspace.AssetID = tblAssets.AssetID
Where tDiskspace.[used space (GB)] >500 And tblAssetCustom.State = 1
Order By tblAssets.AssetName,
tDiskspace.Filesystem
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now