max_elem_ifdefined
Ordering functions maximum element ifdefined
syntax
- max_elem_ifdefined(a, b, .. , n)
definition
max_elem_ifdefined(a, b, .. , n) is a variant of the Max_elem function resulting in defined values if any value of the arguments for an entry in the Domain unit is defined. If all arguments contain Null values, the resulting value for that entry will become null.
example
attribute<int32> max_elem_ifdefinedABC (MDomain) := max_elem_ifdefined(A, B, C);
| A(int32) | B(int32) | C(int32) | max_elem_ifdefinedABC |
|---|---|---|---|
| 0 | 1 | 2 | 2 |
| 1 | -1 | 4 | 4 |
| -2 | 2 | 2 | 2 |
| 4 | 0 | 7 | 7 |
| 999 | 111 | -5 | 999 |
| 2 | null | 1 | 2 |
| 0 | 1 | null | 1 |
| null | 1 | 2 | 2 |
| null | null | null | null |
MDomain, nr of rows = 9