SQL Statement Help
I have tweaked a SQL Statement to provide me with just the report i need. I would like to add GB (gigabyte) infront of the hard drive size.So instead of 78 it would show 78 (GB) or something along those lines. I have no idea how to add the GB string infront of the number provided by the report.sum(isnull(LDisk.Size0,'0'))/1024 + 'GB' did not work.Below is the full SQL Statement, any help is appreciated.ThanksSELECT distinct CS.name0 as 'Computer Name', CS.UserName0 as 'User', BIOS.SerialNumber0 as 'Service Tag', CS.Model0 as 'model', OS.Caption0 as 'OS', RAM.TotalPhysicalMemory0 as 'Total Memory', sum(isnull(LDisk.Size0,'0'))/1024 as 'Hardrive Size GB', Processor.Name0 as 'CPU Model'from v_GS_COMPUTER_SYSTEM CS right join v_GS_PC_BIOS BIOS on BIOS.ResourceID = CS.ResourceID right join v_GS_SYSTEM SYS on SYS.ResourceID = CS.ResourceID right join v_GS_OPERATING_SYSTEM OS on OS.ResourceID = CS.ResourceID right join V_GS_X86_PC_MEMORY RAM on RAM.ResourceID = CS.ResourceID right join v_GS_Logical_Disk LDisk on LDisk.ResourceID = CS.ResourceID right join v_GS_Processor Processor on Processor.ResourceID = CS.ResourceID where LDisk.DriveType0 =3group by CS.Name0, CS.Username0, BIOS.SerialNumber0, CS.Model0, OS.Caption0, RAM.TotalPhysicalMemory0, Processor.Name0
February 12th, 2010 12:21pm

Try to use this instead: convert(varchar(10), sum(isnull(LDisk.Size0,'0'))/1024) + ' GB' as 'Hardrive Size GB', You sir are a prince.Thank you
Free Windows Admin Tool Kit Click here and download it now
February 12th, 2010 2:26pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics