‎11-12-2008 09:49 PM
CREATE PROCEDURE dbo.Web301comp(@comp varchar(300))
AS SELECT dbo.tblOperatingsystem.Description AS Description, dbo.tblComputerSystemProduct.Name AS Model, dbo.tblComputerSystemProduct.Vendor,
dbo.tblComputerSystemProduct.IdentifyingNumber AS Serial, dbo.tblSoundDevice.Caption AS [Audio Card], dbo.tblVideoController.Caption AS [Video Card],
dbo.tblCDROMDrive.Caption AS [Optical Drive], dbo.tblOperatingsystem.Caption AS OS,
dbo.tblOperatingsystem.CSDVersion AS [Service pack],
CAST(CAST(CAST(dbo.tblDiskdrives.Size AS bigint) / 1024 / 1024 / 1024 AS numeric) AS varchar) + ' GB' AS [Hard Drive Size],
CAST(CAST(CAST(dbo.tblComputersystem.TotalPhysicalMemory AS bigint)
/ 1024 / 1024 AS NUMERIC) AS varchar) + ' MB' AS Memory, dbo.web30topprocessor.Processortype AS [Processor type],
CAST(dbo.web30ProcessorCapacity.MaxClockSpeed AS varchar) + ' Mhz' AS Clockspeed, dbo.web30ProcessorCapacity.NrOfProcessors AS Processors,
dbo.tblComputers.Domain, dbo.tblComputers.Lastseen, dbo.tblComputers.Userdomain, dbo.tblComputers.Username,
dbo.tblComputers.Firstseen AS [First seen], dbo.tblADusers.Displayname
FROM dbo.tblComputers LEFT OUTER JOIN
dbo.web30topprocessor ON dbo.tblComputers.Computername = dbo.web30topprocessor.Computername LEFT OUTER JOIN
dbo.web30ProcessorCapacity ON dbo.tblComputers.Computername = dbo.web30ProcessorCapacity.Computername LEFT OUTER JOIN
dbo.tblComputersystem ON dbo.tblComputers.Computername = dbo.tblComputersystem.Computername LEFT OUTER JOIN
dbo.tblComputerSystemProduct ON dbo.tblComputers.Computername = dbo.tblComputerSystemProduct.Computername LEFT OUTER JOIN
dbo.tblOperatingsystem ON dbo.tblComputers.Computername = dbo.tblOperatingsystem.Computername LEFT OUTER JOIN
dbo.tblADusers ON dbo.tblComputers.Username = dbo.tblADusers.Username LEFT OUTER JOIN
dbo.tblSoundDevice ON dbo.tblComputers.Computername = dbo.tblSoundDevice.Computername LEFT OUTER JOIN
dbo.tblVideoController ON dbo.tblComputers.Computername = dbo.tblVideoController.Computername LEFT OUTER JOIN
dbo.tblCDROMDrive ON dbo.tblComputers.Computername = dbo.tblCDROMDrive.Computername LEFT OUTER JOIN
dbo.tblDiskdrives ON (dbo.tblComputers.Computername = dbo.tblDiskdrives.Computername)
WHERE (dbo.tblComputers.Computername = @comp)
GO
‎11-14-2008 09:29 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now