
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2018 11:05 AM
Hi All,
I am having issues adding OU and computer model to the following Hard drive size report.
please can someone assist? here is the SQL i am using for HDD size
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
Sum(Cast(Cast(tblDiskdrives.Size As BigInt) / 1024 / 1024 / 1024 As Numeric))
As [Total size (GB)],
Sum(Cast(Cast(tblDiskdrives.Freespace As BigInt) / 1024 / 1024 /
1024 As Numeric)) As [Free in GB]
From tblAssets
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Group By tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Lastseen
Order By tblAssets.AssetID
I am having issues adding OU and computer model to the following Hard drive size report.
please can someone assist? here is the SQL i am using for HDD size
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
Sum(Cast(Cast(tblDiskdrives.Size As BigInt) / 1024 / 1024 / 1024 As Numeric))
As [Total size (GB)],
Sum(Cast(Cast(tblDiskdrives.Freespace As BigInt) / 1024 / 1024 /
1024 As Numeric)) As [Free in GB]
From tblAssets
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Group By tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Lastseen
Order By tblAssets.AssetID
Labels:
- Labels:
-
Report Center
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2018 06:04 PM
It's worth reading through the database documentation.
The asset's make/model/serial/etc. are found in tblAssetCustom. The asset's AD info is found in tblADComputers.

The asset's make/model/serial/etc. are found in tblAssetCustom. The asset's AD info is found in tblADComputers.
Select Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
Sum(Cast(Cast(tblDiskdrives.Size As BigInt) / 1024 / 1024 / 1024 As Numeric)) As [Total size (GB)],
Sum(Cast(Cast(tblDiskdrives.Freespace As BigInt) / 1024 / 1024 / 1024 As Numeric)) As [Free in GB],
tblAssetCustom.Model,
tblADComputers.OU
From
tblAssets
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Inner Join tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblADComputers ON tblAssets.AssetID = tblADComputers.AssetID
Group By
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Lastseen,
tblAssetCustom.Model,
tblADComputers.OU
Order By
tblAssets.AssetID
