cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
HarkinsIT
Champion Sweeper
I am trying to add a few things to the action screen like audio card, video card, optical drive and hard drive size. I have had success with everything thus far except for hard drive size. Here's my Web301comp Stored Procedure:


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


The way I have it now, this is showing drive sizes for floppy disks and optical drives, which are polluting the information displayed on the action screen. Can anyone maybe help out a SQL newbie and point out what I'm doing wrong?

Thanks in advance!
-Chris
1 REPLY 1
Hemoco
Lansweeper Alumni
Could you show a screenshot and the exact error/problem please.