Function Reference > Functions > %OPR_CONCAT%
  

%OPR_CONCAT%

Uses the CONCAT function and expands an expression in an expression macro to concatenate multiple fields. %OPR_CONCAT% converts all data to text, and then concatenates the fields.

Syntax

%OPR_CONCAT[ macro_input_field ]%
The following table describes the argument for this function:
Argument
Required/
Optional
Description
macro_input_field
Required
Any datatype except Binary. You can use a set of incoming fields or a set of constants. You can enter a macro input field or an expression that includes at least one macro input field.

Return Value

String.
NULL if all strings in the set of fields are NULL.
Returns NULL if all strings are null. Otherwise, ignores the null values and concatenates the strings that are not null.

Example

You have two legacy systems that have merged into one system. You need to concatenate the identification numbers from both systems into another system. The macro input field %ClientID% contains the following fields:
ID1, ID2
The following expression concatenates the fields in %ClientID%:
%OPR_CONCAT[ %ClientID% ]%
%OPR_CONCAT% concatenates the following IDs into one return value:
ID1
ID2
RETURN VALUE
A6JU4199
7021
A6JU41997021
NULL
7022
7022
T7QX9018
7023
T7QX90187023
C2CL5421
7024
C2CL54217024
NULL
NULL
NULL