/build/static/layout/Breadcrumb_cap_w.png

Last Patched Report for all assets

I found a report on this site that is extremely helpful and was wondering if anyone can help me add a field for Operating System so that we can sort the output by that?  Here is the T-SQL for the current report:

SELECT M.NAME, PATCH.TITLE, PMS.STATUS, PMS.STATUS_DT, MAX(PMS.DEPLOY_STATUS_DT) AS "Deploy Date"
FROM ORG2.PATCHLINK_MACHINE_STATUS PMS
JOIN MACHINE M on PMS.MACHINE_ID = M.ID
JOIN KBSYS.PATCHLINK_PATCH PATCH on PATCH.UID = PMS.PATCHUID
WHERE STATUS = "PATCHED"
GROUP BY M.NAME

1 Comment   [ + ] Show comment
  • Good info, thanks.
    Is there a way to order the results by deploy date? I added "ORDER BY PMS.DEPLOY_STATUS_DT" at the end, but it doesn't sort on that field correctly. - todd.varde@hwhlaw.com 5 years ago
    • You probably want "ORDER BY MAX(PMS.DEPLOY_STATUS_DT) DESC" - JasonEgg 5 years ago

Answers (1)

Answer Summary:
Posted by: ondrar 5 years ago
Black Belt
3

Top Answer

SELECT M.NAME, M.OS_NAME, PATCH.TITLE, PMS.STATUS, PMS.STATUS_DT, MAX(PMS.DEPLOY_STATUS_DT) AS "Deploy Date"
FROM ORG1.PATCHLINK_MACHINE_STATUS PMS
JOIN MACHINE M on PMS.MACHINE_ID = M.ID
JOIN KBSYS.PATCHLINK_PATCH PATCH on PATCH.UID = PMS.PATCHUID
WHERE STATUS = "PATCHED"
GROUP BY M.NAME

I highlighted what you need to add.

Comments:
 
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