Wildcard within filter expressions in reports
I'm attempting to exlude servers from my report by using a filter. I'm a newbie so, please bare with me.
I have created the filter throgh advanced settings and it looks like this:
Base Query Filters
-And
-{0}: Equals (this one I use for pulling active nodes)
-{1}: NotEqualTo
-{0} [Operating System Windows].[Name}
-{1} (this is where I'm stuck. The type is Text but Value is my trouble)
I can make it work by adding more filters and changing the Text Value to different Server OS but that is time consuming.
In windows, when I'm looking for something adding * before the word and after pulls everything with that string in my search. How do I make the Altiris do this?
Comments 4 Comments • Jump to latest comment
Have you tried % instead of * ?
Yes. Tried with it only in the beginning after that failed, tried with both, beginning and end
So you're looking for a report that lists your computers and excludes those with a Server OS?
Personally I haven't used the report builder since NS6 days and now do nearly all of my report or filter writing directly in SQL.
This SQL code will show a list of computers that do not contain "server" in their OS Name:
SELECT * from vComputer
Where vComputer.[OS Name] NOT LIKE '%Server%'
I know it's not exactly what you're looking to do but a lot of times creating SQL-based reports or filters will get you what you want a lot quicker.
Thanks Hightower. I didn't have that option "Not Like" but I found the way acutally another way thanks to your suggestion that got me thinking and came up with this:
Base Query Filters
-And
-Not
-Like
-{0}: Field - Operating System Windows. Name
-{1}: %Server%
Works like a charm!
Would you like to reply?
Login or Register to post your comment.