01-15-2013 07:48 PM
01-16-2013 04:32 PM
01-16-2013 02:32 PM
Ceiling(tblFloppy.Size / 1024 / 1024 / 1024)
01-16-2013 01:08 PM
SELECT TOP (1000000) dbo.tblcomputers.ComputerUnique, dbo.tblComputersystem.Computername, dbo.tblADusers.Description AS CostCenter,
dbo.tblADusers.Department, dbo.tblADusers.Displayname, dbo.tblComputerSystemProduct.IdentifyingNumber AS SerialNumber, CONVERT(VarChar(10),
dbo.tblOperatingsystem.InstallDate, 105) AS InstalledDate, dbo.tblCompCustom.BarCode AS InventoryNumber, CONVERT(VarChar(10),
dbo.tblCompCustom.PurchaseDate, 105) AS PurchaseDate, dbo.tblCustom_PeacyComputerTypes.PeacyModel, CONVERT(VarChar(10),
dbo.tblCompCustom.Warrantydate, 105) AS WarrantyDate, dbo.tblCompCustom.OrderNumber, CONVERT(VarChar(10), DATEADD(year, 4,
dbo.tblCompCustom.PurchaseDate), 105) AS ReplacementDate, dbo.tblcomputers.Computer, dbo.web40CorrectMemory.Memory,
dbo.tblComputersystem.Manufacturer, dbo.tblFloppy.Size / 1024 / 1024 / 1024 AS DiskSize
FROM dbo.tblADusers INNER JOIN
dbo.tblCompCustom ON dbo.tblADusers.Username = dbo.tblCompCustom.Custom1 INNER JOIN
dbo.tblComputerSystemProduct ON dbo.tblCompCustom.Computername = dbo.tblComputerSystemProduct.Computername INNER JOIN
dbo.tblOperatingsystem ON dbo.tblCompCustom.Computername = dbo.tblOperatingsystem.Computername RIGHT OUTER JOIN
dbo.tblComputersystem ON dbo.tblCompCustom.Computername = dbo.tblComputersystem.Computername INNER JOIN
dbo.tblcomputers ON dbo.tblcomputers.Computername = dbo.tblCompCustom.Computername INNER JOIN
dbo.tblBIOS ON dbo.tblBIOS.Computername = dbo.tblOperatingsystem.Computername INNER JOIN
dbo.web40CorrectMemory ON dbo.tblcomputers.Computername = dbo.web40CorrectMemory.Computername INNER JOIN
dbo.tblFloppy ON dbo.tblcomputers.Computername = dbo.tblFloppy.Computername LEFT OUTER JOIN
dbo.tblCustom_PeacyComputerTypes ON dbo.tblComputersystem.Model = dbo.tblCustom_PeacyComputerTypes.Model
WHERE (dbo.tblComputersystem.Domainrole = '1') AND (dbo.tblFloppy.Name = N'\\.\PHYSICALDRIVE0')
01-16-2013 12:48 PM
01-16-2013 12:28 PM
01-16-2013 12:24 PM
01-15-2013 09:05 PM
CAST(ROUND((dbo.tblFloppy.Size / 1024 /1024 /1024), 0) AS FLOAT)
01-15-2013 09:09 PM
BullGates wrote:
Thank you very much, how do I round it to GB? I've tried this but it crashes the SQL GUI:CAST(ROUND((dbo.tblFloppy.Size / 1024 /1024 /1024), 0) AS FLOAT)
Cast(Cast(tblFloppy.Size As bigint) / 1024 / 1024 As numeric) As [Total size]
01-15-2013 08:00 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now