cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Johnny
Engaged Sweeper II
Hi,

See below code. Why am I still getting Veeam Backup for Office 365 in my report?

Thank you!

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblSoftwareUni.softwareName As software,
tblSoftware.softwareVersion As version,
Case
When tblSoftware.softwareVersion < MaxVersion.softwareVersion Then
'Out of Date'
Else 'Up to Date'
End As [Patch Status],
Case
When tblSoftware.softwareVersion < MaxVersion.softwareVersion Then '#ffadad'
Else '#d4f4be'
End As backgroundcolor,
tsysOS.Image As icon
From tblSoftware
Inner Join tblAssets On tblSoftware.AssetID = tblAssets.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain,
(Select Top 1 tblSoftware.softwareVersion
From tblSoftware
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where
(tblSoftwareUni.softwareName Not Like
'Microsoft Office 365 OnRamp ActiveX Control' And
tblSoftwareUni.softwareName Not Like
'Veeam Backup for Microsoft Office 365' And
tblSoftwareUni.softwareName Like 'Microsoft Office 365%') Or
(tblSoftwareUni.softwareName Like 'Microsoft 365%' And
tblSoftwareUni.SoftwarePublisher Like 'Microsoft Corporation%')
Order By tblSoftware.softwareVersion Desc) As MaxVersion
Where tblSoftwareUni.softwareName Like '%365%'
Order By version,
tblAssets.AssetName
1 REPLY 1
RCorbeil
Honored Sweeper II
Because your filter only says "show me all software where the name contains '365'".
Where
tblSoftwareUni.softwareName Like '%365%'

If you want to exclude Veeam Backup, you need to add that as a filter.
Where
tblSoftwareUni.softwareName Like '%365%'
AND tblSoftwareUni.softwareName NOT LIKE 'Veeam Backup%'