→ Celebrate SysAdmin Day 2024 with Lansweeper Enter our Giveaway here

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
usfitdci
Engaged Sweeper
I finally finished this report but haveing a problem changing the Total Physical Memory from bytes to MB (from 4294144000 to 4294). Here is my code below.

Select Top 1000000 tblComputers.Computer, tblComputers.Domain, tblCompCustom.Custom2 As [Tech Contact], tblADComputers.OperatingSystem, tblComputersystem.SystemType, tblComputersystem.Model, tblComputersystem1.NumberOfProcessors As [# of Processors], tblPROCESSOR.Name As [Processor Type], tblDiskdrives.Caption As Drive, Cast(Cast(tblDiskdrives.Freespace As bigint) / 1024 / 1024 As numeric) As [Free Space], Cast(Cast(tblDiskdrives.Size As bigint) / 1024 / 1024 As numeric) As [Total Size], tblComputersystem.TotalPhysicalMemory As [Total Physical Memory], tblSoftware.softwareVersion As [Symantec Version], tblSoftware1.softwareVersion As [TSM Version], tblADComputers.OU, tblCompCustom1.LastPatched From tblComputers Inner Join tblCompCustom On tblComputers.Computername = tblCompCustom.Computername Inner Join tblADComputers On tblComputers.Computername = tblADComputers.Computername Inner Join tblComputersystem On tblComputers.Computername = tblComputersystem.Computername Inner Join tblComputersystem tblComputersystem1 On tblComputers.Computername = tblComputersystem1.Computername Inner Join tblPROCESSOR On tblComputers.Computername = tblPROCESSOR.Computername Inner Join tblDiskdrives On tblComputers.Computername = tblDiskdrives.Computername Inner Join tblSoftware On tblComputers.Computername = tblSoftware.ComputerName Inner Join tblSoftware tblSoftware1 On tblComputers.Computername = tblSoftware1.ComputerName Inner Join tblCompCustom tblCompCustom1 On tblComputers.Computername = tblCompCustom1.Computername Where Cast(Cast(tblDiskdrives.Size As bigint) / 1024 / 1024 As numeric) <> 0 And tblPROCESSOR.DeviceID = 'CPU0' And tblDiskdrives.DriveType = 3 And tblSoftware.softwareName = 'Symantec Endpoint Protection' And tblSoftware1.softwareName = 'IBM Tivoli Storage Manager Client' Order By tblComputers.Computer, Cast(Cast(tblDiskdrives.Freespace As bigint) / 1024 / 1024 As numeric), tblDiskdrives.Caption


Thanks for your help.

dc
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
You need to do something similar as Cast(Cast(tblDiskdrives.Size As bigint) / 1024 / 1024 As numeric)


use

floor(Cast(Cast(TotalPhysicalMemory As bigint) / 1024 / 1024 As numeric))

View solution in original post

1 REPLY 1
Hemoco
Lansweeper Alumni
You need to do something similar as Cast(Cast(tblDiskdrives.Size As bigint) / 1024 / 1024 As numeric)


use

floor(Cast(Cast(TotalPhysicalMemory As bigint) / 1024 / 1024 As numeric))