/build/static/layout/Breadcrumb_cap_w.png

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


0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: KevinG 3 years ago
Red Belt
0

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 3 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ