‎12-08-2020 07:37 PM
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
‎12-08-2020 08:43 PM
Where
tblSoftwareUni.softwareName Like '%365%'
Where
tblSoftwareUni.softwareName Like '%365%'
AND tblSoftwareUni.softwareName NOT LIKE 'Veeam Backup%'
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now