cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Jokey
Engaged Sweeper
Hello,

I've created an report that show me all of our workstations that have no Sophos anti-Virus installed.
But we have also a lot of ThinClients which have no Sophos installed. I don't want to see them in my report. All of the ThinClients are in the assetgroup "ThinClients". Is it possible to show me all computers that have the Sophos Anti-Virus installed but is not in the assetgroup "ThinClients"?

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tblAssets.Description,
tblAssets.Lastseen,
tsysOS.Image As icon
From tblAssets
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblAssets.AssetID Not In (Select tblSoftware.AssetID
From tblSoftware Inner Join tblAssets On tblAssets.AssetID =
tblSoftware.AssetID Inner Join tblSoftwareUni On tblSoftwareUni.SoftID =
tblSoftware.softID
Where tblSoftwareUni.softwareName = 'Sophos Anti-Virus') And
tblComputersystem.Domainrole < 2 And tblAssetCustom.State = 1
Order By tblAssets.AssetName
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
Please try this:
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tblAssets.Description,
tblAssets.Lastseen,
tsysOS.Image As icon
From tblAssets
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where (tblAssets.AssetID Not In (Select tblSoftware.AssetID
From tblSoftware Inner Join tblAssets On tblAssets.AssetID =
tblSoftware.AssetID Inner Join tblSoftwareUni On tblSoftwareUni.SoftID =
tblSoftware.softID
Where tblSoftwareUni.softwareName = 'Sophos Anti-Virus') And
tblAssets.AssetID Not In (Select tblAssets.AssetID
From tblAssets Inner Join tblAssetGroupLink On tblAssets.AssetID =
tblAssetGroupLink.AssetID Inner Join tblAssetGroups
On tblAssetGroups.AssetGroupID = tblAssetGroupLink.AssetGroupID
Where tblAssetGroups.AssetGroup = 'ThinClients')) And
tblComputersystem.Domainrole < 2 And tblAssetCustom.State = 1
Order By tblAssets.AssetName

View solution in original post

1 REPLY 1
Hemoco
Lansweeper Alumni
Please try this:
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tblAssets.Description,
tblAssets.Lastseen,
tsysOS.Image As icon
From tblAssets
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where (tblAssets.AssetID Not In (Select tblSoftware.AssetID
From tblSoftware Inner Join tblAssets On tblAssets.AssetID =
tblSoftware.AssetID Inner Join tblSoftwareUni On tblSoftwareUni.SoftID =
tblSoftware.softID
Where tblSoftwareUni.softwareName = 'Sophos Anti-Virus') And
tblAssets.AssetID Not In (Select tblAssets.AssetID
From tblAssets Inner Join tblAssetGroupLink On tblAssets.AssetID =
tblAssetGroupLink.AssetID Inner Join tblAssetGroups
On tblAssetGroups.AssetGroupID = tblAssetGroupLink.AssetGroupID
Where tblAssetGroups.AssetGroup = 'ThinClients')) And
tblComputersystem.Domainrole < 2 And tblAssetCustom.State = 1
Order By tblAssets.AssetName

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now