String concatenation: \
Syntax
op1 || op2
Input parameters
op1, op2 |
the operands |
Semantics for scalar operations
Concatenates two strings.
For example, "Hello" || ", World"
gives "Hello, World"
.
Input parameters type
op1, op2
dataset { measure<string> _+ }
| component<string>
| string
Result type
result
dataset { measure<string> _+ }
| component<string>
| string
Additional Constraints
None.
Behavior
The operator has the behaviour of the “Operators applicable on two Scalar Values or Data Sets or Data Set Components” (see the section “Typical behaviours of the ML Operators”).
Examples
Given the operand datasets DS_1 and DS_2:
Input DS_1 (see structure)
Id_1 |
Id_2 |
Me_1 |
---|---|---|
1 |
A |
hello |
2 |
B |
hi |
Input DS_2 (see structure)
Id_1 |
Id_2 |
Me_1 |
---|---|---|
1 |
A |
world |
2 |
B |
there |
Example 1
DS_r := DS_1 || DS_2;
results in (see structure):
Id_1 |
Id_2 |
Me_1 |
---|---|---|
1 |
A |
helloworld |
2 |
B |
hithere |
Example 2
DS_r := DS_1[calc Me_2 := Me_1 || " world"];
results in (see structure):
Id_1 |
Id_2 |
Me_1 |
Me_2 |
---|---|---|---|
1 |
A |
hello |
hello world |
2 |
B |
hi |
hi world |