‎08-26-2019 03:10 PM
‎08-26-2019 05:30 PM
Select Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried
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
Where
tblAssetCustom.State = 1 -- active
AND tblAssets.AssetType = -1 -- Windows machines
AND tblComputerSystem.Domainrole <= 1 -- workstations
AND Not Exists (Select tblSoftware.AssetID
From tblSoftware
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where tblSoftware.AssetID = tblAssets.AssetID
And tblSoftwareUni.softwareName = 'software_1_name'
And tblSoftware.softwareVersion = 'software_1_version')
AND Not Exists (Select tblSoftware.AssetID
From tblSoftware
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where tblSoftware.AssetID = tblAssets.AssetID
And tblSoftwareUni.softwareName = 'software_2_name'
And tblSoftware.softwareVersion = 'software_2_version')
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now