Help with KACE SQL
Hello, I'm almost done with the script but I'm not sure how to get the software versions.
This is what I currently have:
SELECT CATALOG.SAM_CATALOG.NAME, PUBLISHER, SMJT.MINOR_VERSION AS 'Software Version', COUNT(DISTINCT SMJT.MACHINE_ID) AS INSTALLED_ON, CATALOG.SAM_CATALOG.ID FROM CATALOG.SAM_CATALOG join SAM_MACHINE_JT SMJT ON SMJT.SAM_CATALOG_ID = CATALOG.SAM_CATALOG.ID WHERE (CATALOG.SAM_CATALOG.SAM_TYPE = 'ADDREMOVE') AND ((CATALOG.SAM_CATALOG.NAME not like '%Driver%') AND (CATALOG.SAM_CATALOG.NAME not like '%Service Pack%') AND (CATALOG.SAM_CATALOG.NAME not like '%Update%') AND (CATALOG.SAM_CATALOG.NAME not like '%Redistributable%')) GROUP BY CATALOG.SAM_CATALOG.ID ORDER BY INSTALLED_ON
It outputs the File Version column, but not the values.
What do I need to add so that it gives me the file version?
Answers (1)
Top Answer
See if this output is correct for the versions.
CATALOG.SAM_CATALOG.PUBLISHER,
CATALOG.SAM_CATALOG.MAJOR_VERSION,
COUNT(DISTINCT SMJT.MACHINE_ID) AS INSTALLED_ON,
CATALOG.SAM_CATALOG.ID
FROM CATALOG.SAM_CATALOG
join SAM_MACHINE_JT SMJT ON SMJT.SAM_CATALOG_ID = CATALOG.SAM_CATALOG.ID
WHERE (CATALOG.SAM_CATALOG.SAM_TYPE = 'ADDREMOVE') AND ((CATALOG.SAM_CATALOG.NAME not like '%Driver%')
AND (CATALOG.SAM_CATALOG.NAME not like '%Service Pack%') AND (CATALOG.SAM_CATALOG.NAME not like '%Update%')
AND (CATALOG.SAM_CATALOG.NAME not like '%Redistributable%'))
GROUP BY CATALOG.SAM_CATALOG.ID ORDER BY INSTALLED_ON
Comments:
-
Thank you so much! It worked! - Cyber Morgan 4 years ago