‎02-17-2017 02:19 PM
Solved! Go to Solution.
‎02-17-2017 10:29 PM
SELECT Top 1000000
tsysAssetTypes.AssetTypeIcon10 AS icon,
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysOS.OSname,
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 - tblDiskdrives.Freespace) / Power(10, 9)) AS [Used (GB)],
Cast((tblDiskdrives.Size - tblDiskdrives.Freespace) / tblDiskdrives.Size * 100 AS Decimal(8,2)) AS [Pct Used],
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblDomainRoles.DomainRoleName
FROM
tblAssets
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
INNER JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
INNER JOIN tblComputersystem ON tblAssets.AssetID = tblComputersystem.AssetID
INNER JOIN tblDomainRoles ON tblDomainRoles.DomainRole = tblComputerSystem.DomainRole
INNER JOIN tblDiskdrives ON tblDiskdrives.AssetID = tblAssets.AssetID AND tblDiskdrives.DriveType = 3
INNER JOIN tsysOS ON tblAssets.OScode = tsysOS.OScode
WHERE
tblAssetCustom.State = 1
AND tblComputersystem.Domainrole > 1
ORDER BY
tblAssets.AssetUnique,
tblDiskdrives.Caption
‎04-05-2019 05:12 PM
‎02-17-2017 10:54 PM
‎02-17-2017 10:53 PM
‎02-17-2017 10:52 PM
‎02-17-2017 10:52 PM
‎02-17-2017 10:51 PM
‎02-17-2017 10:50 PM
‎02-17-2017 10:29 PM
SELECT Top 1000000
tsysAssetTypes.AssetTypeIcon10 AS icon,
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysOS.OSname,
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 - tblDiskdrives.Freespace) / Power(10, 9)) AS [Used (GB)],
Cast((tblDiskdrives.Size - tblDiskdrives.Freespace) / tblDiskdrives.Size * 100 AS Decimal(8,2)) AS [Pct Used],
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblDomainRoles.DomainRoleName
FROM
tblAssets
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
INNER JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
INNER JOIN tblComputersystem ON tblAssets.AssetID = tblComputersystem.AssetID
INNER JOIN tblDomainRoles ON tblDomainRoles.DomainRole = tblComputerSystem.DomainRole
INNER JOIN tblDiskdrives ON tblDiskdrives.AssetID = tblAssets.AssetID AND tblDiskdrives.DriveType = 3
INNER JOIN tsysOS ON tblAssets.OScode = tsysOS.OScode
WHERE
tblAssetCustom.State = 1
AND tblComputersystem.Domainrole > 1
ORDER BY
tblAssets.AssetUnique,
tblDiskdrives.Caption
‎04-05-2019 08:15 AM
RC62N wrote:SELECT Top 1000000
Ceiling(tblDiskdrives.Size / Power(10, 9)) AS [Capacity (GB)],
Ceiling(tblDiskdrives.Freespace / Power(10, 9)) AS [Free (GB)],
Ceiling((tblDiskdrives.Size - tblDiskdrives.Freespace) / Power(10, 9)) AS [Used (GB)],
Cast((tblDiskdrives.Size - tblDiskdrives.Freespace) / tblDiskdrives.Size * 100 AS Decimal(8,2)) AS [Pct Used],
tblDiskdrives.Size / Power(1024, 2) AS [Capacity (GB)],
tblDiskdrives.Freespace / Power(1024, 2) AS [Free (GB)],
(tblDiskdrives.Size - tblDiskdrives.Freespace) / Power(1024, 2) AS [Used (GB)],
Cast((tblDiskdrives.Size - tblDiskdrives.Freespace) / tblDiskdrives.Size * 100 AS Decimal(8,2)) AS [Pct Used],
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now