STRING_CONCAT macro

The STRING_CONCAT macro is available in Unica Campaign and Unica Interact.

Syntax

STRING_CONCAT(string1, string2, ... stringN)

Parameters

string

An ASCII text string to concatenate. This can be ASCII text in quotes, a column of text, a cell range containing text, or an expression evaluating to any of the above. If this parameter is a numeric or a date time value, it is converted to string using the default format in the Interact run time server. See the "Macro Function Parameters" section r for your product for the format definition of string (same as data).
Note: Numeric and datetime values can be directly passed to this macro in all Interact areas. However, validation fails if used in an interactive flowchart.

Description

STRING_CONCAT concatenates the ASCII text values in the specified data ranges. It returns one new column for each input column, each containing the concatenated strings from the corresponding rows of strings. This row-by-row calculation produces a result for each row up to the last value of the shortest column.

Note: The total width of each resulting string cannot exceed 255 characters.

Unica Interact also supports the following syntax:

STRING_CONCAT( string1 , string2 , ... stringN )

For example, STRING_CONCAT('a', 'b', 'c', 'd') is valid.

Examples

TEMP = STRING_CONCAT("house", "boat")

Creates a new column named TEMP, which contains the ASCII text string "houseboat ".

TEMP = STRING_CONCAT(V1, ".")

Creates a new column named TEMP, each row containing the ASCII text string in the corresponding row of column V1 with an appended period.

TEMP = STRING_CONCAT(V1, V2)

Creates a new column named TEMP, each row containing the containing the ASCII text string in column V1 concatenated with the text string in column V2.

TEMP = STRING_CONCAT(V1:V3, V4:V6)

Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the concatenated strings from the corresponding rows of column V1 and V4, the values of the VX column are the concatenated strings from the corresponding rows of column V2 and V5, and the values of the VY column are the concatenated strings from the corresponding rows of column V3 and V6.

TEMP = STRING_CONCAT(V1[5:10]:V2, V3:V4)

Creates two new columns named TEMP and VX. The values in the TEMP column are strings from rows 5-10 of column V1 concatenated with the rows 1-6 of column V3. The values in VX are the strings from rows 5-10 of column V2 concatenated with the rows 1-6 of column V4.

TEMP = STRING_CONCAT('a', 'b', 'c', 'd')

Creates a new column named TEMP, which contains the ASCII text string "abcd ".

Related Functions

Function Description
STRING_HEAD Returns the first n characters of each string in the specified data range
STRING_LENGTH Returns the length of each string in the specified data range
STRING_SEG Returns the string segment between two specified indexes
STRING_TAIL Returns the last n characters of each string in the specified data range