cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
David_Elliott
Engaged Sweeper II
We're pushing Office 365 and this report shows me the workstations that have not received it yet. I need to refine it to exclude machines with OUs that include the words TRAINING or LOBBIES.
Thanks.


Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Username,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblADComputers.OU
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Where tblAssets.AssetID Not In (Select Top 1000000 tblSoftware.AssetID
From tblSoftware Inner Join tblSoftwareUni On tblSoftwareUni.SoftID =
tblSoftware.softID
Where
tblSoftwareUni.softwareName Like 'Microsoft Office 365 ProPlus - en-us%')
And tsysAssetTypes.AssetTypename = 'Windows' And
tblComputersystem.Domainrole < 2
Order By tblADComputers.OU
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
Add the below to the Criteria column for the tblADComputers.OU expression.
Not Like '%training%' And Not Like '%lobbies%'

For future reporting, we would recommend reviewing some SQL tutorials, as the Lansweeper report builder uses standard SQL queries and what you are asking is a basic SQL thing. There are several good tutorials available online, e.g.: http://www.w3schools.com/sql/default.asp

View solution in original post

1 REPLY 1
Hemoco
Lansweeper Alumni
Add the below to the Criteria column for the tblADComputers.OU expression.
Not Like '%training%' And Not Like '%lobbies%'

For future reporting, we would recommend reviewing some SQL tutorials, as the Lansweeper report builder uses standard SQL queries and what you are asking is a basic SQL thing. There are several good tutorials available online, e.g.: http://www.w3schools.com/sql/default.asp

New to Lansweeper?

Try Lansweeper For Free

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

Try Now