/build/static/layout/Breadcrumb_cap_w.png

Patches by machine

Hello, I have the following SQL report which is supposed to group by machine name and display all patches that have been successfully patched. My problem is that I do not really know how to group items on the report.

SELECT M.NAME AS MACHINE_NAME,
P.IDENTIFIER AS KB_ARTICLE,
P.TITLE AS DISPLAY_NAME,
S.STATUS_DT AS STATUS_DATE
FROM MACHINE_LABEL_JT MJ,
MACHINE M,
LABEL L,
PATCHLINK_MACHINE_STATUS S,
KBSYS.PATCHLINK_PATCH P
WHERE M.ID=MJ.MACHINE_ID
AND L.ID=MJ.LABEL_ID
AND M.ID = S.MACHINE_ID
AND S.PATCHUID = P.UID
AND S.STATUS = 'PATCHED'
AND (( 1 IN (SELECT 1
FROM PATCHLINK_PATCH_STATUS
WHERE P.UID = PATCHLINK_PATCH_STATUS.PATCHUID
AND PATCHLINK_PATCH_STATUS.STATUS IN ( 0 )) ))
AND M.NAME RLIKE 'Audit'
ORDER BY MACHINE_NAME,
P.TITLE

In addition i'm having an issue where only items scanned in July and August are coming out but I would like to see year to date, as you can see I do not have any filters on dates.

0 Comments   [ + ] Show comments

Answers (1)

Posted by: dchristian 12 years ago
Red Belt
0
You can add a GROUP BY after the where statement in your query.

It also looks like there's duplicates in the report, so another option would be a SELECT DISTINCT.

If your trying to group by items on the report in KACE, add MACHINE_NAME as your break on column under the report details.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

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