Not equal to: <>

Syntax

left <> right

Input parameters

left

the left operand

right

the right operand

Examples of valid syntaxes

DS_1 <> DS_2

Semantics for scalar operations

The operator returns FALSE if the left is equal to right, TRUE otherwise. For example:

5 <> 9 gives TRUE
5 <> 5 gives FALSE
“hello” <> “hi” gives TRUE

Input parameters type

left, right

dataset {measure<scalar> _}
| component<scalar>
| scalar

Result type

result

dataset { measure<boolean> bool_var }
| component<boolean>
| boolean

Additional Constraints

Operands left and right must be of the same scalar type.

Behaviour

The operator has the typical behaviour of the “Operators changing the data type” (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

Id_3

Id_4

Me_1

G

Total

Percentage

Total

7.1

R

Total

Percentage

Total

Input DS_2 (see structure)

Id_1

Id_2

Id_3

Id_4

Me_1

G

Total

Percentage

Total

7.5

R

Total

Percentage

Total

3

Example 1

DS_r := DS_1 <> DS_2;

results in (see structure):

DS_r

Id_1

Id_2

Id_3

Id_4

bool_var

G

Total

Percentage

Total

True

R

Total

Percentage

Total

Example 2

DS_r := DS_1 [ calc Me_2 := Me_1<>7.5 ];

results in (see structure):

DS_r

Id_1

Id_2

Id_3

Id_4

Me_1

Me_2

G

Total

Percentage

Total

7.1

True

R

Total

Percentage

Total

Regarding example 1, note that due to the behaviour for NULL values, if the value for G` in the second operand had also been NULL, then the result would still be NULL for Greece.