‎07-27-2016 03:01 PM
Solved! Go to Solution.
‎07-28-2016 10:54 PM
Select Distinct tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress As IP,
tsysOS.OSname,
tsysOS.Image As icon,
(Case When s.AssetID Is Not Null Then 'True' Else 'False' End) As Installed,
(Case When s.softwareVersion Like '%.%.2.%' Then 'Corporate'
When s.softwareVersion Like '%.%.1.%' Then 'Consumer' Else 'Unknown'
End) As Version,
s.softwareVersion,
(Case
When (tblAntivirus.productUpToDate = 1 And s.AssetID Is Not Null) Then
'Up To Date'
When (tblAntivirus.productUpToDate = 0 And s.AssetID Is Not Null) Then
'Out of Date' Else 'Unknown' End) As AVStatus
From tblAssets
Inner Join tblComputersystem On tblComputersystem.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Outer Join tblAntivirus On tblAntivirus.AssetID = tblAssets.AssetID
Left Outer Join (Select Distinct tblSoftware.AssetID,
tblSoftware.softwareVersion
From tblSoftware
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where tblSoftwareUni.softwareName Like 'Malwarebytes%') s
On s.AssetID = tblAssets.AssetID
Where tblComputersystem.Domainrole < 2 And tblAssetCustom.State = 1
Order By tblAssets.AssetName
‎07-28-2016 11:08 PM
‎07-28-2016 10:54 PM
Select Distinct tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress As IP,
tsysOS.OSname,
tsysOS.Image As icon,
(Case When s.AssetID Is Not Null Then 'True' Else 'False' End) As Installed,
(Case When s.softwareVersion Like '%.%.2.%' Then 'Corporate'
When s.softwareVersion Like '%.%.1.%' Then 'Consumer' Else 'Unknown'
End) As Version,
s.softwareVersion,
(Case
When (tblAntivirus.productUpToDate = 1 And s.AssetID Is Not Null) Then
'Up To Date'
When (tblAntivirus.productUpToDate = 0 And s.AssetID Is Not Null) Then
'Out of Date' Else 'Unknown' End) As AVStatus
From tblAssets
Inner Join tblComputersystem On tblComputersystem.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Outer Join tblAntivirus On tblAntivirus.AssetID = tblAssets.AssetID
Left Outer Join (Select Distinct tblSoftware.AssetID,
tblSoftware.softwareVersion
From tblSoftware
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where tblSoftwareUni.softwareName Like 'Malwarebytes%') s
On s.AssetID = tblAssets.AssetID
Where tblComputersystem.Domainrole < 2 And tblAssetCustom.State = 1
Order By tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now