→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
blighter
Engaged Sweeper III
Hi all,

I'm having trouble excluding a certain OU (OU=Desktops, OU=United Kingdom, OU=Locations, OU=EU99-Stores, DC=eu, DC=loi, DC=net) from the below report... any ideas? I've tried everything, including:

And tblADComputers.OU != '%EU99-Stores%'

And tblADComputers.OU Not Like '%EU99-Stores%'

And tblADComputers.OU <> '%EU99-Stores%'

And tblADComputers.OU != 'OU=Desktops, OU=United Kingdom, OU=Locations, OU=EU99-Stores, DC=eu, DC=loi, DC=net'

And tblADComputers.OU Not Like 'OU=Desktops, OU=United Kingdom, OU=Locations, OU=EU99-Stores, DC=eu, DC=loi, DC=net'

And tblADComputers.OU <> 'OU=Desktops, OU=United Kingdom, OU=Locations, OU=EU99-Stores, DC=eu, DC=loi, DC=net'


Full code:
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Username,
tblOperatingsystem.Caption,
tblADComputers.OU
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblOperatingsystem
On tblAssets.AssetID = tblOperatingsystem.AssetID
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Where tblOperatingsystem.Caption = 'Microsoft Windows XP Professional'
And tblADComputers.OU != '%EU99-Stores%'

2 REPLIES 2
Hemoco
Lansweeper Alumni
The below criterion should work. Could you please try this again.
And tblADComputers.OU Not Like '%EU99-Stores%'
blighter
Engaged Sweeper III
Lansweeper wrote:
The below criterion should work. Could you please try this again.
And tblADComputers.OU Not Like '%EU99-Stores%'


That is working now! Grr, maybe I did a typo 😞



Thank you