MicroStrategy ONE

Concat (Concatenate)

The Concat function combines two or more input strings into one continuous string and returns the result. For example, concatenating the two strings "Micro" and "Strategy" would result in the single string "MicroStrategy". Concat is often used to combine related values, such as a first and last name.

Syntax

Concat(Argument1, Argument2,..., ArgumentN)

Where:

Argument1,..., ArgumentN are facts, metrics, columns, or string values.

For information on the syntax used in your specific database, see MicroStrategy and Database Support for Functions and see the section that corresponds to your database.

Example

The Concat function can help to create attribute forms that are a combination of multiple columns in database tables. For example, an LU_CUSTOMER table includes two columns: CUST_FIRST_NAME and CUST_LAST_NAME. You can create a single attribute form that combines these two columns as described below.

Concat([CUST_FIRST_NAME], [CUST_LAST_NAME])

The input from the first column is concatenated with the input from the second column, to display information such as JohnDoe and JaneDoe for the attribute form.

For scenarios such as the one described above, you can use the ConcatBlank function (see ConcatBlank (Concatenate Plus Blank Space) below) to concatenate the strings and include a space between the two strings. This can result in attribute forms that are easier to read. For example, rather than displaying JohnDoe, the attribute form would display John Doe.

For an additional example of using the Concat function, see the example section for the function InitCap (Initial Capitalization).