How do you scope a software search to a specific version?
I'm trying to create a device Smart Label containing all devices that have VMWare Workstation installed that isn't version 16. I try:
"Software/Software Titles" = "VMWare Workstation" AND
"Software/Software Version" does not begin with "16".
The problem is that it's not limiting the scope of the version search to the VMWare software title. If the device has ANY software installed that is version 16, it's excluded from the search. Is there anyway to specify which software item the version number is relating to?
Answers (1)
Top Answer
Try this query as a smart label, it will get all machines that have VMWare Workstation installed but not version 16.
SELECT MACHINE.ID AS TOPIC_ID,
MACHINE.NAME AS SYSTEM_NAME
FROM MACHINE
LEFT JOIN MACHINE_SOFTWARE_JT MSJ
ON MSJ.MACHINE_ID = MACHINE.ID
LEFT JOIN SOFTWARE
ON SOFTWARE.ID = MSJ.SOFTWARE_ID
WHERE MACHINE.ID IN ( SELECT MACHINE.ID
FROM MACHINE
LEFT JOIN MACHINE_SOFTWARE_JT MS
ON MS.MACHINE_ID = MACHINE.ID
LEFT JOIN SOFTWARE S
ON S.ID = MS.SOFTWARE_ID
WHERE S.DISPLAY_NAME LIKE "%VMWare Workstation%"
and S.DISPLAY_VERSION NOT LIKE "16%"
AND S.IS_PATCH = 0
GROUP BY MACHINE.ID
)
GROUP BY MACHINE.ID
Comments:
-
That worked out great. Thanks so much. - jlfrank 2 years ago