/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


Last Patched Report for all assets

07/31/2018 377 views
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
Answer Summary:
1 Comment   [ + ] Show comment

Comments

  • 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.

Answer Chosen by the Author

3
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.
Answered 07/31/2018 by: ondrar
Black Belt

 
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