MicroStrategy ONE

Command Manager Script Syntax

The Command Manager script engine uses a unique syntax that is similar to SQL and other such scripting languages. For a complete guide to the commands and statements used in Command Manager, see the Command Manager Help.

A Command Manager script consists of one or more script statements. Each statement ends with a semicolon (;).

Statements consist of one or more tokens. A token is a word, a list of words enclosed in quotation marks, or a symbol. A token is recognized by Command Manager as an individual unit with a specific meaning. Tokens can be:

  • reserved words, which are words with a specific meaning in a Command Manager script. For a complete list of reserved words, see the Command Manager Help.
  • identifiers, which are words that the user provides as parameters for the script. For example, in the statement LIST MEMBERS FOR USER GROUP "Managers"; the word Managers is an identifier. Identifiers must be enclosed in quotation marks.

    In general, either double quotes or single quotes can be used to enclose identifiers. However, if you want to include either single quotes or double quotes as part of an identifier, you must either enclose that identifier in the other kind of quotes, or put a caret in front of the interior quote. For example, to refer to a metric named Count of "Outstanding" Customer Ratings, you would need to use one of the following methods:

    Use single quotes to enclose the identifier:

    'Count of "Outstanding" Customer Ratings'

    Use double quotes to enclose the identifier and put carets in front of the interior double quotes:

    "Count of ^"Outstanding^" Customer Ratings"

    If your identifier contains double-byte characters, such as characters used in the Korean, Japanese, or Chinese character sets, you must enclose the identifier in square brackets [ ]. If the identifier is also enclosed in quotation marks, these square brackets must be placed inside the quotation marks.

  • symbols, such as ; , ' " ^

    The caret (^) functions as an escape character. It causes any other special character that follows it to be treated literally and not interpreted as a special character. If you want to include a literal caret in your statement, you must precede it with another caret. For example, if you have a user group named ^Control, in Command manager scripts you must refer to it as ^^Control.

  • numbers in any notation
  • dates
  • object GUIDs
  • other special characters such as carriage returns, tabs, or spaces