Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use of Wildcard in Attribute Qualification?

Status
Not open for further replies.

Mars2003

Technical User
Dec 20, 2007
4
0
0
GB
Hi, I'm trying get a dataset back from our warehouse that matches any one of a list of text strings, unfortunately I can't guarantee these Strings and Therefore I'm attempting to use wildcards at either end of the text string, so that I capture all results. It's not working.

On the attribute Qualification window I'm using the "Qualify On" option and the "In List" operator with the following list structure "*Bill Topping*","*Richard Smith*"

Can anyone point me in the right direction.
 
I don't think in a SQL IN 'xyz' statement you can have wildcards. If it's IN then it is a literal string.

Depending on the size of your list, use LIKE *Bill Topping*

Unfortunately this means each entry in your list would have to be done seperately. Make the filter operators OR and you'll end up with SQL like...

where (Fact.AttributeDesc like '%Bill Topping%'
or Fact.AttributeDesc like '%Richard Smith%')
 
Thanks, that's what I feared.

Had this been in MS access then I'd have been fine, but I can seem to get to a point in Microstrategy desktop where I could write the SQL for each of my 200-300 criteria strings.

It would be good if I could amend an exiting MS report in a freeform SQL mode, but I dont believe it's possible. I'd be happy to be wrong though.

Thanks for your reply anyway
 
You could use Command Manager to build the filters?

Much easier for mass object creation... bit of messing round in notepad to get the list first then use Command Manager to run your script. Will look something like

CREATE FILTER "Bill Topping" IN FOLDER "\Public Objects\Filters\TekTips" EXPRESSION
"AttributeTitle@DESC like (^"%Bill Topping%^")" ON PROJECT "TekTips";
CREATE FILTER "Richard Smith" IN FOLDER "\Public Objects\Filters\TekTips" EXPRESSION
"AttributeTitle@DESC like (^"%Richard Smith%^")" ON PROJECT "TekTips";
ad nauseum

Then join them all up with OR statements.

But I agree, it's not good!
 
Thanks, I'll take this up with our project administrator.
 
Hmmm... I wonder also (it's a slow afternoon!) if you could write a piece of freeform SQL in MSTR and use the resultant report as a filter for a second report (so Report As Filter).
 
Nice idea, but attribute outputted needs processed into a less specific String that can be used between my wildcards and I can't work out how to do this as it's not a calculated metric.

eg [ANDREW LANGWORTHY (ADVICE) D]

needs to be translated as [*ANDREW LANGWORTHY*], which I was doing in excel, hoping to load it all back up as a concatenated filter list.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top