Query to MSO 2003 w/o Compatibility Pack

Query to MSO 2003 w/o Compatibility Pack

I'm trying to create a collection query that will get all the computers that have either MS Office 2003 (Pro & Standard) that do not have the Compatibility Pack for the Office system 2007 installed.

This does not give me the correct results. Will I have to use a join or a union, instead? I don't know SQL very well.

select Guid from vResource where ResourceTypeGuid in
(select ResourceTypeGuid from ResourceTypeHierarchy
where BaseResourceTypeGuid='493435f7-3b17-4c4c-b07f-c23e7ab7781f'
)

and
(Guid in
(select [_ResourceGuid] from[Inv_AeX_OS_Add_Remove_Programs] where [Inv_AeX_OS_Add_Remove_Programs].[Name]
= 'Microsoft Office Professional Edition 2003')

or

Guid in
(select [_ResourceGuid] from [Inv_AeX_OS_Add_Remove_Programs] where [Inv_AeX_OS_Add_Remove_Programs].[Name]
= 'Microsoft Office Standard Edition 2003'))

and
(Guid in
(select [_ResourceGuid] from [Inv_AeX_OS_Add_Remove_Programs] where [Inv_AeX_OS_Add_Remove_Programs].[Name]
!= 'Compatibility Pack for the 2007 Office system'))

Thanks for any help.

Try

MFINN's picture