Logical conjunction: and

Syntax

op1 and op2

Input parameters

op1

the first operand

op2

the second operand

Examples of valid syntaxes

DS_1 and DS_2

Semantics for scalar operations

The and operator returns TRUE if both operands are TRUE, otherwise FALSE. The two operands must be of boolean type. For example: | FALSE and FALSE gives FALSE | FALSE and TRUE gives FALSE | FALSE and NULL gives FALSE | TRUE and FALSE gives FALSE | TRUE and TRUE gives TRUE | TRUE and NULL gives NULL | NULL and NULL gives NULL

Input parameters type

op1, op2

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

Result type

result

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

Additional Constraints

None.

Behavior

The operator has the typical behaviour of the “Behaviour of Boolean operators” (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

M

15

B

2013

True

M

64

B

2013

False

M

65

B

2013

True

F

15

U

2013

False

F

64

U

2013

False

F

65

U

2013

True

Input DS_2 (see structure)

Id_1

Id_2

Id_3

Id_4

Me_1

M

15

B

2013

False

M

64

B

2013

True

M

65

B

2013

True

F

15

U

2013

True

F

64

U

2013

False

F

65

U

2013

False

Example 1

DS_r:= DS_1 and DS_2;

results in (see structure):

DS_r

Id_1

Id_2

Id_3

Id_4

Me_1

M

15

B

2013

False

M

64

B

2013

False

M

65

B

2013

True

F

15

U

2013

False

F

64

U

2013

False

F

65

U

2013

False

Example 2

DS_r := DS_1 [ calc Me_2:= Me_1 and true ];

results in (see structure):

DS_r

Id_1

Id_2

Id_3

Id_4

Me_1

Me_2

M

15

B

2013

True

True

M

64

B

2013

False

False

M

65

B

2013

True

True

F

15

U

2013

False

False

F

64

U

2013

False

False

F

65

U

2013

True

True