K1000 Report of All Patches Missing by Machine
Trying to make a tidy report that will show all patches missing grouped by machine name. Does anyone have some good SQL they want to donate that has been working out well for them?
Answers (1)
For each Machine, what patches are NOT installed
**SQL Statement**
Select CASE WHEN MACHINE.SYSTEM_DESCRIPTION = '' THEN MACHINE.NAME WHEN MACHINE.SYSTEM_DESCRIPTION != '' THEN CONCAT(MACHINE.NAME, "\\", MACHINE.SYSTEM_DESCRIPTION) END AS MACHINE_NAME,
P.TITLE AS DISPLAY_NAME, P.IDENTIFIER as KB_ARTICLE from PATCHLINK_MACHINE_STATUS S, MACHINE, KBSYS.PATCHLINK_PATCH P
where
MACHINE.ID = S.MACHINE_ID and
S.PATCHUID = P.UID and
S.STATUS != 'PATCHED'
order by MACHINE_NAME, P.TITLE
Comments:
-
Works nicely in MySQL Workbench. Thank you! - GeekSoldier 11 years ago
-
This report is works for me, but what I really want is a count for the number of patches missing for each PC. Adding a count statement in workbench gives me an execute command denied error. I'm not sure if this is because the data comes from multiple tables and access is actually denied or I'm just doing it wrong. - MichaelMc 9 years ago