I'm having some scan issues (a topic for another post), but I'd like to include the PCs that are scanned and not scanned. I'm guessing this query isn't working on the "Not Scanned" PCs because there is no OS name in that field or some other "empty" field.
I'd like to modify this report to include any computer that has data in the tblcompcustom.department, regardless of it's been scanned or not in LS.
Like in the Domain Overview, when clicking on the domain name, it reports all PCs scanned or not. Then I'd like to customize the output with the fields below.
Thanks.
SELECT TOP 1000000 tblcomputers.computername,
tblcomputers.computerunique,
web40osname.compimage AS icon,
web40osname.osname,
tblcomputers.sp AS [Service Pack],
tblcompcustom.location,
tblcompcustom.department AS [Research Unit],
tblcompcustom.custom1 AS [User Name],
tsyschassistypes.chassisname AS Type,
tblcompcustom.barcode AS [Inventory Number],
tblbios.releasedate,
tblsystemenclosure.serialnumber
FROM tblcomputers
INNER JOIN tbldiskdrives
ON tblcomputers.computername = tbldiskdrives.computername
LEFT OUTER JOIN web40processorcapacity
ON tblcomputers.computername =
web40processorcapacity.computername
INNER JOIN web40activecomputers
ON tblcomputers.computername = web40activecomputers.computername
INNER JOIN web40correctmemory
ON web40correctmemory.computername = tblcomputers.computername
INNER JOIN web40osname
ON web40osname.computername = tblcomputers.computername
INNER JOIN tblcomputersystemproduct
ON tblcomputers.computername =
tblcomputersystemproduct.computername
LEFT JOIN tblcompcustom
ON tblcomputers.computername = tblcompcustom.computername
INNER JOIN tblbios
ON tblcomputers.computername = tblbios.computername
INNER JOIN tblsystemenclosure
ON tblcomputers.computername = tblsystemenclosure.computername
INNER JOIN tsyschassistypes
ON tsyschassistypes.chassistype = tblsystemenclosure.chassistypes
WHERE tblcompcustom.department LIKE '%UNIT%'
AND tbldiskdrives.caption = 'c:'
ORDER BY dbo.tblcomputers.computername