/bundles/itninjaweb/img/Breadcrumb_cap_w.png

Hi all,

Need some help please.

I am trying to create a report that shows ' Patches reported installed in Software Inventory' as shown in the inventory for each device if you manualy look, but for an estate of 5000 devices. I undertand the csv will be huge.

I can do this individually with the following:

SELECT SOFTWARE.DISPLAY_NAME, SOFTWARE.PUBLISHER FROM ORG1.SOFTWARE

JOIN MACHINE_SOFTWARE_JT on MACHINE_SOFTWARE_JT.SOFTWARE_ID = SOFTWARE.ID

JOIN MACHINE on MACHINE.ID = MACHINE_SOFTWARE_JT.MACHINE_ID

WHERE IS_PATCH = 1

and MACHINE.NAME = "*********"

But it would take an age for 5000 devices. Is there a way I can run the above across all devices, or does anybody know a way?

Thanks




0 Comments   [ - ] Hide Comments

Comments

Please log in to comment

Answer this question or Comment on this question for clarity

Answers

0
Basically you'll want to remove the "and machine.name=" from your WHERE statement and it will give you all machines (because you're not specifying a particular machine). I would add "MACHINE.NAME" to your select so you know which machine each record is for. 

SELECT MACHINE.NAME, SOFTWARE.DISPLAY_NAME, SOFTWARE.PUBLISHER 
FROM ORG1.SOFTWARE
  JOIN MACHINE_SOFTWARE_JT on MACHINE_SOFTWARE_JT.SOFTWARE_ID = SOFTWARE.ID
  JOIN MACHINE on MACHINE.ID = MACHINE_SOFTWARE_JT.MACHINE_ID
WHERE IS_PATCH = 1

Answered 12/21/2017 by: getElementById
Third Degree Blue Belt

Please log in to comment
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share