/build/static/layout/Breadcrumb_cap_w.png

I have a customer who's using a k1000 system and is able to generate reports about critical patches but would also like to generate one for important patches. I don't have any sqlexperiance and was wondering if someone could help me out

Here is the query they sent me:

SELECT M.NAME AS MACHINE_NAME,
OS_NAME AS WINDOWS_VERSION,
SUM(MS.STATUS='PATCHED') AS PATCHED,
SUM(MS.STATUS='NOTPATCHED') AS NOTPATCHED,
ROUND((SUM(MS.STATUS='PATCHED')/(SUM(MS.STATUS='PATCHED')
  +SUM(MS.STATUS='NOTPATCHED')))*100,0) AS PERCENT_PATCHED
FROM PATCHLINK_MACHINE_STATUS MS
JOIN KBSYS.PATCHLINK_PATCH PP ON (PP.UID = MS.PATCHUID)
JOIN PATCHLINK_PATCH_STATUS PPS ON (PPS.PATCHUID = PP.UID)
JOIN MACHINE M ON (M.ID = MS.MACHINE_ID)
JOIN MACHINE_LABEL_JT ML ON (M.ID = ML.MACHINE_ID)
JOIN LABEL L ON (ML.LABEL_ID = L.ID)
WHERE PP.IMPACTID = 'Critical'
AND PPS.STATUS = 0
AND PP.IS_SUPERCEDED = 0
GROUP BY M.NAME
ORDER BY M.NAME, PERCENT_PATCHED


0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: chucksteel 8 years ago
Red Belt
1

Top Answer

The possible IMPACTID values in the PATCHLINK_PATCH table are Software, Critical and Recommended. Assuming that by important they mean Recommended you can change this line:
WHERE PP.IMPACTID = 'Critical'
to:
WHERE PP.IMPACTID = 'Recommended'

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