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?

Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

2

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

Answered 03/21/2013 by: nshah
Red Belt

  • Works nicely in MySQL Workbench. Thank you!
  • 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.
Please log in to comment
Answer this question or Comment on this question for clarity