/build/static/layout/Breadcrumb_cap_w.png

Need machines not compliant by patch report for just patches in a label

There is a canned report "Machines not compliant by patch", but I need to limit it to just the patches in a particular label, say, "approved patches".  How do I change the SQL to just look for the patches in that label? This should be trivial, but I can't get it.

Here is the SQL of the canned report:

SELECT PP.TITLE AS DISPLAY_NAME,
M.NAME AS ComputerName,
SYSTEM_DESCRIPTION, IP, MAC,
M.USER_LOGGED as USER_LOGGED,
CS_DOMAIN
FROM PATCHLINK_MACHINE_STATUS MS
JOIN KBSYS.PATCHLINK_PATCH PP ON PP.UID = MS.PATCHUID
JOIN MACHINE M ON M.ID = MS.MACHINE_ID
WHERE MS.STATUS = 'NOTPATCHED'
ORDER BY PP.TITLE


0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: Shootifitmoves 12 years ago
Senior White Belt
1

Solved it:

SELECT PP.TITLE AS DISPLAY_NAME
     , M.NAME AS ComputerName
     , M.IP
     , M.MAC
     , M.USER_LOGGED AS USER_LOGGED
FROM
  ORG1.PATCHLINK_MACHINE_STATUS MS
INNER JOIN KBSYS.PATCHLINK_PATCH PP
ON PP.UID = MS.PATCHUID
INNER JOIN ORG1.MACHINE M
ON M.ID = MS.MACHINE_ID
INNER JOIN ORG1.PATCHLINK_PATCH_LABEL_JT
ON PATCHLINK_PATCH_LABEL_JT.PATCHUID = PP.UID
INNER JOIN ORG1.LABEL
ON PATCHLINK_PATCH_LABEL_JT.LABEL_ID = LABEL.ID
WHERE
  MS.STATUS = 'NOTPATCHED'
  AND LABEL.NAME = 'Patching - Approved Windows 7 Critical Patches'
ORDER BY
  DISPLAY_NAME

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