• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 178
  • Last Modified:

Help with Boolean Search

I am creating a default query to base a scope on and I need some help. LAN

As part of the query, I have about 8 or 9 specific machine names I want to exclude, and several others that have similar, but not exact name.

So when I get to this grouping in the query
AND ("Computer"."Device Name" NOT LIKE "Specificmachine1"
OR "Computer"."Device Name" NOT LIKE "Specificmachine2"
OR "Computer"."Device Name" NOT LIKE "Specificmachine3"
OR "Computer"."Device Name" NOT LIKE "Specificmachine4"
OR "Computer"."Device Name" NOT LIKE "ABDR")

 The first 4 in the example are specific names of computer, the last on  is PART of a name that appears in several computers.  But when I run the query, that last line is ignored and I see computers with ABDR in the results.

What I want for that like is any computer with ADBR anywhere in the device name.

Me and Boolean searches only cooperate so far and then I go nuts.

 

Thanks
0
MrSlithy
Asked:
MrSlithy
  • 2
  • 2
2 Solutions
 
pony10usCommented:
So what you are really looking for is not:
OR "Computer"."Device Name" NOT LIKE "ABDR")

but more like:
OR "Computer"."Device Name" CONTAINS "ABDR")

or use wild cards:
OR "Computer"."Device Name" NOT LIKE "*ABDR*")
0
 
MrSlithyAuthor Commented:
Yeah, but I didn't see that originally as an option in Landesk. That's what I tried on a new query, all other items removed for troubleshooting.  

But now that I look more closely at Landesk help on this I see that it does allow for"*ABDR" and also for "ABRD*"
but I was trying *ABDR* and couldn't get it to work.  

So maybe I'' try creating a group of two operators  and see what happens
*ABDR or ABDR*

Thanks.
0
 
ozoCommented:
Do you mean AND rather than OR?
0
 
pony10usCommented:
So maybe I'' try creating a group of two operators  and see what happens
 *ABDR or ABDR*

Will only return results that start or end with ABDR.
0
 
MrSlithyAuthor Commented:
That's it! CONAINS. Duh!

This is a Landesk query builder and I only have the following options
+, <>, <=,>=,<,>,Exist, not exist. like, not like.

So that explains it.  There are, indeed, several variations.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now