Patch Report with all Inventoried Devices Listed
I have the patch report SQL queries that are easily found here but after I run them I notice I am seeing only 188 of 287 devices on the report listed. Why am I missing more than a few devices on my patch report? Here's the SQL query I am using:
M.NAME AS MACHINE_NAME,
OS_NAME AS WINDOWS_VERSION,
SUM(MS.DETECT_STATUS = 'PATCHED') AS PATCHED,
SUM(MS.DETECT_STATUS = 'NOTPATCHED') AS NOTPATCHED,
FLOOR(ROUND((SUM(MS.DETECT_STATUS = 'PATCHED') / (SUM(MS.DETECT_STATUS = 'PATCHED') + SUM(MS.DETECT_STATUS = 'NOTPATCHED'))) * 100,1)) AS PERCENT_PATCHED
KBSYS.PATCH PP ON (PP.ID = MS.PATCH_ID)
PATCH_STATUS PPS ON (PPS.PATCH_ID = PP.ID)
MACHINE M ON (M.ID = MS.MACHINE_ID)
PPS.STATUS = 0 AND PP.IS_SUPERCEDED = 0
AND PPS.IS_SUPERCEDED = 0
AND PP.TITLE NOT RLIKE 'Silverlight|Java|Skype|Chrome|Flash|Adobe|7-Zip|Server Management Studio'
GROUP BY MS.MACHINE_ID
ORDER BY PERCENT_PATCHED , M.NAME
If I used the Asset Name Report I see all devices on the report. Here's what that query looks like.
SELECT MACHINE.NAME AS SYSTEM_NAME FROM MACHINE ORDER BY SYSTEM_NAME
Appreciate any help you can provide. Just want to make sure I am accounting for all of my devices and giving an accurate report to my supervisors.
Be the first to answer this question