Less than < <=

Syntax

left { < | <= }¹ right

Input parameters

left

the left operand

right

the right operand

Examples of valid syntaxes

DS_1 < DS_2
DS_1 <= DS_2

Semantics for scalar operations

The operator < returns TRUE if left is smaller than right, FALSE otherwise. The operator <= returns TRUE if left is smaller than or equal to right, FALSE otherwise. For example:

5 < 4 gives FALSE
5 <= 5 gives TRUE
"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”). Some valid examples could be: DS_1 < DS_2, DS_1 <= DS_2.

Examples

Given the operand dataset DS_1:

Input DS_1 (see structure)

Id_1

Id_2

Id_3

Id_4

Me_1

2012

B

Total

Total

11094850

2012

G

Total

Total

11123034

2012

S

Total

Total

46818219

2012

M

Total

Total

2012

F

Total

Total

5401267

2012

W

Total

Total

7954662

Example 1

DS_r := DS_1 < 15000000;

results in (see structure):

DS_r

Id_1

Id_2

Id_3

Id_4

bool_var

2012

B

Total

Total

True

2012

G

Total

Total

True

2012

S

Total

Total

False

2012

M

Total

Total

2012

F

Total

Total

True

2012

W

Total

Total

True