Update built-in K1000 report to only include specific devices?
Looking at the built-in Patching report called "Devices not compliant by patch" I'd like to update it to only show laptops in the search, not all devices (or just desktops, or just servers, etc.)
I tried messing with the SQL query but it always returns an error. Below is the SQL query already used but what line do I need to add for the exclusion?
I've tried variations of adding lines like WHERE M.NAME LIKE Laptop or WHERE CHASSIS_TYPE = LAPTOP but can't get it to work.
SELECT PP.TITLE AS DISPLAY_NAME,
M.NAME AS ComputerName,
SYSTEM_DESCRIPTION, IP, MAC,
M.USER_LOGGED as USER_LOGGED,
CS_DOMAIN
FROM PATCH_MACHINE_STATUS MS
JOIN KBSYS.PATCH PP ON PP.ID = MS.PATCH_ID
JOIN MACHINE M ON M.ID = MS.MACHINE_ID
WHERE MS.DETECT_STATUS = 'NOTPATCHED'
ORDER BY PP.TITLE
Answers (1)
Top Answer
Here is what it would look like if you wanted to modify the where clause to look for chassis type of 'laptop'
SELECT PP.TITLE AS DISPLAY_NAME,
M.NAME AS ComputerName,
SYSTEM_DESCRIPTION, IP, MAC,
M.USER_LOGGED as USER_LOGGED,
CS_DOMAIN,
M.CHASSIS_TYPE
FROM PATCH_MACHINE_STATUS MS
JOIN KBSYS.PATCH PP ON PP.ID = MS.PATCH_ID
JOIN MACHINE M ON M.ID = MS.MACHINE_ID
WHERE MS.DETECT_STATUS = 'NOTPATCHED' AND M.CHASSIS_TYPE = 'Laptop'
ORDER BY PP.TITLE
Comments:
-
Thank you that worked great! - ITUTC 4 years ago