Reporting assistance
Hi Folks,
I need assistance with this report please - I am trying to add Ip Addresses to this report that shows number of systems, how many patches they are each missing with the IP address of the machine. But for some reason cannot get the IPs to show up.
Select M.NAME as MACHINE_NAME, M.USER, M.USER_FULLNAME, SUM(MS.STATUS='NOTPATCHED') AS NOT_PATCHED
FROM ORG1.PATCHLINK_MACHINE_STATUS MS JOIN ORG1.MACHINE M ON M.ID = MS.MACHINE_ID
JOIN KBSYS.PATCHLINK_PATCH PP ON PP.UID = MS.PATCHUID
JOIN PATCHLINK_PATCH_STATUS PPS ON PPS.PATCHUID = PP.UID
JOIN ORG1.MACHINE_LABEL_JT ML ON (M.ID = ML.MACHINE_ID)
JOIN LABEL L ON (ML.LABEL_ID = L.ID)
where MS.STATUS='NOTPATCHED' AND PPS.STATUS = 0 /* 0=active patches */
and L.NAME LIKE ('%site systems%')
group by MACHINE_NAME
order by MACHINE_NAME
0 Comments
[ + ] Show comments
Answers (1)
Answer Summary:
he IP address is stored in the MACHINE table in the IP column. In your query you have that table aliased to M so you can select it by adding M.IP to your select clause. Select M.NAME as MACHINE_NAME, M.USER, M.USER_FULLNAME, SUM(MS.STATUS='NOTPATCHED') AS NOT_PATCHED, M.IP
he IP address is stored in the MACHINE table in the IP column. In your query you have that table aliased to M so you can select it by adding M.IP to your select clause. Select M.NAME as MACHINE_NAME, M.USER, M.USER_FULLNAME, SUM(MS.STATUS='NOTPATCHED') AS NOT_PATCHED, M.IP
Please log in to answer
Posted by:
chucksteel
8 years ago
Top Answer
The IP address is stored in the MACHINE table in the IP column. In your query you have that table aliased to M so you can select it by adding M.IP to your select clause.
Select M.NAME as MACHINE_NAME, M.USER, M.USER_FULLNAME, SUM(MS.STATUS='NOTPATCHED') AS NOT_PATCHED, M.IP
That would add it as the last column in your report.
Comments:
-
Chuck, thank you this worked perfectly. - bozadmin 8 years ago