‎02-02-2016 01:15 PM
Solved! Go to Solution.
‎02-03-2016 05:48 PM
SELECT Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblDiskdrives.Caption,
tblDiskdrives.Volumename,
tblDiskdrives.FileSystem,
Ceiling(tblDiskdrives.Size / Power(10, 9)) As [Capacity (GB)],
Ceiling(tblDiskdrives.Freespace / Power(10, 9)) As [Free (GB)],
Ceiling(tblDiskdrives.Size / Power(2, 30)) As [Capacity (GiB)],
Ceiling(tblDiskdrives.Freespace / Power(2, 30)) As [Free (GiB)],
tbldomainroles.Domainrolename
FROM
tblAssets
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
INNER JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
INNER JOIN tblDiskdrives ON tblAssets.AssetID = tblDiskdrives.AssetID
INNER JOIN tblComputersystem ON tblAssets.AssetID = tblComputersystem.AssetID
INNER JOIN tbldomainroles ON tbldomainroles.Domainrole = tblComputersystem.Domainrole
WHERE
tblAssetCustom.State = 1 -- active asset
AND tblComputersystem.Domainrole > 1 -- server
AND tblDiskdrives.DriveType = 3 -- fixed disk drive
ORDER BY
tblAssets.AssetName,
tblDiskdrives.Caption
‎02-03-2016 05:48 PM
SELECT Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblDiskdrives.Caption,
tblDiskdrives.Volumename,
tblDiskdrives.FileSystem,
Ceiling(tblDiskdrives.Size / Power(10, 9)) As [Capacity (GB)],
Ceiling(tblDiskdrives.Freespace / Power(10, 9)) As [Free (GB)],
Ceiling(tblDiskdrives.Size / Power(2, 30)) As [Capacity (GiB)],
Ceiling(tblDiskdrives.Freespace / Power(2, 30)) As [Free (GiB)],
tbldomainroles.Domainrolename
FROM
tblAssets
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
INNER JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
INNER JOIN tblDiskdrives ON tblAssets.AssetID = tblDiskdrives.AssetID
INNER JOIN tblComputersystem ON tblAssets.AssetID = tblComputersystem.AssetID
INNER JOIN tbldomainroles ON tbldomainroles.Domainrole = tblComputersystem.Domainrole
WHERE
tblAssetCustom.State = 1 -- active asset
AND tblComputersystem.Domainrole > 1 -- server
AND tblDiskdrives.DriveType = 3 -- fixed disk drive
ORDER BY
tblAssets.AssetName,
tblDiskdrives.Caption
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now