SQL Report: Computers with MS Office 2003 Without 2007 Compatibility Pack

SQL Report: Computers with MS Office 2003 Without 2007 Compatibility Pack
MFINN's picture

Here's some SQL that'll query computers with MS Office 2003 without the Office 2007 compatibility pack. Just go to reports, create a new one, and select 'Enter SQL Directly', then copy and paste the sql into there.

SELECT T0.[Domain] AS 'Domain', T0.[Name] AS 'Name',
T0.[OS Name] AS 'OS Name', T1.[Name] AS 'Name' FROM 
[Inv_AeX_AC_Identification] T0 INNER JOIN 
[Inv_AeX_OS_Add_Remove_Programs] T1 ON 
T0.[_ResourceGuid] = T1.[_ResourceGuid] WHERE T1.[Name] 
LIKE 'Microsoft Office%' AND T1.[Name] LIKE '%Edition 
2003%' AND T0.[Name] NOT IN (SELECT T0.[Name] AS 'Name'
FROM [Inv_AeX_AC_Identification] T0 INNER JOIN 
[Inv_AeX_OS_Add_Remove_Programs] T1 ON 
T0.[_ResourceGuid] = T1.[_ResourceGuid] WHERE T1.[Name] 
LIKE 'Compatibility Pack for the 2007 Office system')

3.897435
Average: 3.9 (39 votes)

Thanks! Ran in our environment

DeborahAlbrecht's picture

We were able to run this in our environment. I handed the results off to our end user technology team for them to review.

One item to note is that I had to break up the SQL before it ran and returned data. My SQL Server Mgmt Studio did not like it all bunched together.

-d

SELECT T0.[Domain] AS 'Domain',
T0.[Name] AS 'Name',
T0.[OS Name] AS 'OS Name',
T1.[Name] AS 'Name'

FROM [Inv_AeX_AC_Identification] T0
INNER JOIN [Inv_AeX_OS_Add_Remove_Programs] T1
ON T0.[_ResourceGuid] = T1.[_ResourceGuid]

WHERE T1.[Name] LIKE 'Microsoft Office%'
AND T1.[Name] LIKE '%Edition 2003%'
AND T0.[Name] NOT IN
(
SELECT T0.[Name] AS 'Name'
FROM [Inv_AeX_AC_Identification] T0
INNER JOIN [Inv_AeX_OS_Add_Remove_Programs] T1
ON T0.[_ResourceGuid] = T1.[_ResourceGuid]
WHERE T1.[Name]
LIKE 'Compatibility Pack for the 2007 Office system')

Interesting. Altiris

MFINN's picture

Interesting. Altiris Console doesn't care, but it can't hurt for me to tidy up my SQL. :)