Search syntax

Hello there!

Today let’s talk about syntax for searching in Mirostrategy.

For quick search:

AND: To search objects with books and library you must use the AND in capital letters, like: books AND library. Microstrategy will search all objects with books and library that have those words anywhere in object’s name. You can also use OR, but it is default, so you don’t need to write it.

+: If you want to make it mandatory, you can include a +, like: +books library. Microstrategy will search all objects that contains books and may contain library.

NOT: To search objects with books without library, like: books NOT library. Microstrategy will search for all objects that have books and doesn’t contains library.

For regular search:

*:  You can use * as a wildcard to substitute one or more characters, like: sales*. Microstrategy will search for all objects that has sales, like: salesman, sales tax.

If you put * sales, you will get: dollar sales, value sales.

If you put *sales, you will get: dsales, dollarsales.

So, if you change the position of the * it will alter the result that you get.

 ?: Replaces 1 character only. Example: sale? – you will get: sales, salel. But never sales.

The following examples assume that the attribute Name has two display (browse) forms: First and Last. First refers to the first name and Last refers to the last name.

Search keywords that do not include wildcards have wildcards added at the beginning and the end.
User Input: aaa
Filter: First Name like “*aaa*” or Last Name like “*aaa*”
Any text that is included inside of double quotes is treated as a literal comparison. For example:
User Input: “aaa”
Filter: First Name = “aaa” or Last Name = “aaa”
If you include wildcards, then MicroStrategy Web does not add any. For example:
User Input: aaa*
Filter: First Name like “aaa*” or Last Name like “aaa*”
User Input: a*aa
Filter: First Name like “a*aa” or Last Name like “a*aa”
A blank space, a comma, or the word OR indicates a logical OR between two conditions. An OR is placed in between multiple forms.
User Input: aaa* *bbb User Input: aaa*,*bbb User Input: aaa* OR *bbb
Filter: (First Name like “aaa*” or Last Name like “aaa*”) OR (First Name like “*bbb” or Last Name like “*bbb”)
An ampersand symbol (&) or the word AND indicates a logical AND between two conditions. An OR is placed between multiple forms.
User Input: “aaa”&”bbb” User Input: “aaa” AND “bbb”
Filter: (First Name = “aaa” or Last Name = “aaa”) AND (First Name = “bbb” or Last Name = “bbb”)
A minus symbol (-) or the word NOT indicates a logical AND NOT between two conditions. If the – operator or the NOT operator is placed at the beginning of the search text, the operator is used as NOT. If the – operator or the NOT operator is placed at the end of the search text, the operator is ignored.
User Input: “aaa” NOT “bbb”
Filter: (First Name = “aaa” or Last Name = “aaa”) AND NOT (First Name =”bbb” or Last Name = “bbb”)

User Input: – “aaa”
Filter: NOT (First Name = “aaa” or Last Name = “aaa”)

User Input: “aaa” AND “bbb” NOT
Filter: (First Name = “aaa” or Last Name = “aaa”) AND (First Name = “bbb” or Last Name = “bbb”)
A form name (not case-sensitive) followed by a colon can be used to search on a specific form.

User Input: [Last]:aaa
Filter: Last Name like “*aaa*”

User Input: [First]:aaa OR [Last]:bbb OR ccc
Filter: (First Name like “*aaa*”) or (Last Name like “*bbb*”) or (First Name like “*ccc*” or Last Name like “*ccc*”)
A comparison operator (<, <=, >, >=) can be placed in front of a condition. The comparison operator must be the first character in the search text or preceded by blank spaces.

User Input: ID > 3000
Filter: ID greater than 3000

Hope it helps.

God bless you!

Part of this text was copied from: http://www2.microstrategy.com/producthelp/9.4/WebUser/WebHelp/Lang_1033/Search_syntax.htm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s