‎02-06-2020 09:55 PM
Select Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAntivirus.DisplayName As Antivirus,
tblAssets.Domain,
tsysAssetTypes.AssetTypename As Type,
tblAssets.IPAddress As [IP Address],
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tblAssets.Lasttried,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblAntivirus On tblAssets.AssetID = tblAntivirus.AssetID
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Where tblAssetCustom.State = 1 And tblAntivirus.productUpToDate = 0
Order By tblAssets.AssetName
‎02-07-2020 07:40 PM
Select Top 1000000
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tsysAssetTypes.AssetTypename As Type,
tblAssets.IPAddress As [IP Address],
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tblAssets.Lasttried,
tblAssets.Firstseen,
tblAssets.Lastseen,
AntivirusA.DisplayName AS A_name,
AntivirusB.DisplayName AS B_name
From
tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblComputerSystem On tblComputerSystem.AssetID = tblAssets.AssetID
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Left Join (Select tblAntivirus.AssetID,
tblAntivirus.DisplayName
From tblAntivirus
Where tblAntivirus.DisplayName Like '%ANTIVIRUS A%'
And tblAntivirus.productUpToDate = 0) AS AntivirusA On AntivirusA.AssetID = tblAssets.AssetID
Left Join (Select tblAntivirus.AssetID,
tblAntivirus.DisplayName
From tblAntivirus
Where tblAntivirus.DisplayName Like '%ANTIVIRUS B%'
And tblAntivirus.productUpToDate = 0) AS AntivirusB On AntivirusB.AssetID = tblAssets.AssetID
Where
tblAssetCustom.State = 1 -- active
AND tblAssets.AssetName Not Like '%SERV%'
AND AntivirusA.AssetID IS NOT NULL -- expired Antivirus A found
AND AntivirusB.AssetID IS NOT NULL -- expired Antivirus B found
‎02-07-2020 08:35 PM
‎02-07-2020 02:00 AM
‎02-07-2020 06:59 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAntivirus.DisplayName As Antivirus,
tblAssets.IPAddress As [IP Address],
tsysIPLocations.IPLocation,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tblAssets.Lasttried,
tblAssets.Lastseen,
tblSoftwareUni.softwareName
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblAntivirus On tblAssets.AssetID = tblAntivirus.AssetID
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Left Join tblSoftware On tblAntivirus.AssetID = tblSoftware.AssetID
Left Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where tblAssets.AssetName Not Like '%SERV%' And
tblSoftwareUni.softwareName Like '%ANTIVIRUS A%' And
tblAntivirus.productUpToDate = 0 And tblSoftwareUni.softwareName Like
'%ANTIVIRUS B%' And tblAntivirus.productUpToDate = 0 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