cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rongalvez
Engaged Sweeper
What do I need to do to get a report to display all servers and all the hard drives storage? Please help..

6 REPLIES 6
stahly8
Engaged Sweeper III
is there a way to get this report to show an extra 2 decimal places. i modified code abit to make it easier to read via gbs.


SELECT TOP 100 PERCENT
dbo.tblComputers.Computername AS Computer,
dbo.tblDiskdrives.Caption,
CAST(CAST(dbo.tblDiskdrives.Freespace AS bigint) / 1024 / 1024 AS numeric) AS Free,
CAST(CAST(dbo.tblDiskdrives.Size AS bigint) / 1024 / 1024 AS numeric) AS [Total size],
dbo.tblDiskdrives.Lastchanged AS [Last changed],
dbo.tblDiskdrives.Size
FROM
dbo.tblComputers
INNER JOIN dbo.tblDiskdrives ON (dbo.tblComputers.Computername = dbo.tblDiskdrives.Computername)
INNER JOIN dbo.tblOperatingsystem ON (dbo.tblComputers.Computername = dbo.tblOperatingsystem.Computername)
INNER JOIN dbo.Web30repAllServers ON (dbo.tblComputers.Computername = dbo.Web30repAllServers.Computername)
rongalvez
Engaged Sweeper
It works. Thanks Cobra7
Cobra7
Champion Sweeper
Try this:

SELECT TOP 100 PERCENT 
dbo.tblComputers.Computername AS Computer,
dbo.tblDiskdrives.Caption,
CAST(CAST(dbo.tblDiskdrives.Freespace AS bigint) / 1024 / 1024 AS numeric) AS Free,
CAST(CAST(dbo.tblDiskdrives.Size AS bigint) / 1024 / 1024 AS numeric) AS [Total size],
dbo.tblDiskdrives.Lastchanged AS [Last changed],
dbo.tblDiskdrives.Size
FROM
dbo.tblComputers
INNER JOIN dbo.tblDiskdrives ON (dbo.tblComputers.Computername = dbo.tblDiskdrives.Computername)
INNER JOIN dbo.tblOperatingsystem ON (dbo.tblComputers.Computername = dbo.tblOperatingsystem.Computername)
INNER JOIN dbo.Web30repAllServers ON (dbo.tblComputers.Computername = dbo.Web30repAllServers.Computername)
rongalvez
Engaged Sweeper
Cobra, I am looking for total size for all hard drive storage.
rongalvez
Engaged Sweeper
Cobra,
Cobra7
Champion Sweeper
What do you mean by Hard Drive storage? As in the size of the HDD's? The free space?