Developer Documentation Library > UNICOM Intelligence Function Library > Categorical functions > Merge
 
Merge
Returns the union of a number of categorical values; that is, returns the categories that are in any of the input categorical values.
Syntax
Merge([<values>, ...])
Parameter
<values>
Type: None
One or more values.
(return)
Type: None
The union of categorical values from <values>.
Notes
Values in <values> are converted to categorical values if necessary, and the return value is their union. NULL values are ignored. If a value cannot be converted to a categorical type, an error occurs. If <values> is empty (no arguments are supplied), or all the values are NULL, the return value is NULL. This function differs from using the + operator to get the union of categorical values, by ignoring NULL values instead of giving a NULL result if any NULL values are present. It differs from the Union function by not supporting the use of category expressions.
Example
The following mrScriptBasic example combines the results of three categorical variables to produce a merged categorical variable.
Merge(Q1, Q2, Q3)
See also
Categorical functions