/build/static/layout/Breadcrumb_cap_w.png

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
Posted by: chucksteel 7 years ago
Red Belt
0

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 7 years ago

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