Operators resulting in a set of values

The following operators are available: set, union, intersect, removeduplicates.

Set creation

XML tag:

Set

Operands:

at least one value

Synopsis:

<set>
<value 1>

...
<value n>
</set>

Operands:

All data types, but for non-numerical data types, a uniform data type within the list of operands is necessary. Different numerical data types are automatically converted into the DOUBLE data type.

Result:

Set of values

Result type:

DOUBLE for mixed numerical operands, data type of first operand for non-numerical data types

Description:

Creates a set of values from the specified values.

Calculation (PPM3/PPM4)

Result

Empty set if all operands return NULL, i.e., the result set never contains NULL

Error

If at least one operand is of an invalid data type (set of values or data type not identical with first operand)

Example:

<set>
<constant>
<dataitem value="2">
<datatype name="DOUBLE"/>
</dataitem>
</constant>
<value 1>
<value 2>
<value n>
</set>

Set union

XML tag:

Union

Operands:

At least two sets of values (<attribute ... /> or <set>...</set> or <union>...</union> or <intersect>...</intersect>)

Synopsis:

<union>
<Set of values 1>
<Set of values 2>
...
<Set of values n>
</union>

Operands:

all data types, but not a mixture of numerical and non-numerical data types

Result:

Set of values

Result type:

DOUBLE for mixed numerical operands, data type of first operand for non-numerical data types

Description:

Creates the set union of the specified sets of values.

Calculation (PPM3)

Result

Empty set if all operands are empty sets

Error

If at least one operand is of an invalid data type or at least one operand equals NULL

Calculation (PPM4)

Result

Empty set if all operands are empty sets. NULL if at least one operand equals NULL.

Error

If at least one operand is of an invalid data type

Example:

<union>
<attribute name="AT_START_TIME" nodetype="PROCESS"/>
<attribute name="AT_END_TIME" nodetype="PROCESS"/>
<attribute name="AT_START_TIME" nodetype="OT_FUNC"/>
<attribute name="AT_END_TIME" nodetype="OT_FUNC"/>
</union>

Intersection

XML tag:

Intersect

Operands:

at least two sets of values

Synopsis:

<intersect>
<Set of values 1>
<Set of values 2>
...
<Set of values n>
</intersect>

Operands:

all data types, but not a mixture of numerical and non-numerical data types

Result:

Set of values containing all elements contained in all initial sets

Result type:

DOUBLE for mixed numerical operands,
data type of first operand for unmixed data types

Description:

Creates the intersection of the specified sets of values.

Calculation (PPM3)

Result

Empty set if one operand is an empty set.

Error

If at least one operand is of an invalid data type or at least one operand equals NULL

Calculation (PPM4)

Result

Empty set if one operand is an empty set. NULL if at least one operand equals null.

Error

If at least one operand is of an invalid data type

Example:

-

Duplicate remover

XML tag:

Removeduplicates

Operands:

exactly one set of values

Synopsis:

<removeduplicates>
<Set of values>
</removeduplicates>

Operands:

Any data types

Result:

Set of values

Result type:

Operand data type

Description:

Removes elements with identical values from a set of values.

Calculation (PPM4 only)

Result

Set of values containing all elements contained in the initial set, but each one only once. Empty set if operand is an empty set.

Error

If at least one element in the set of values is of an invalid data type

Example:

Counting the plants involved in the process:

<card>
<removeduplicates>
<attribute name="AT_WERK" nodetype"OT_FUNC" />
</removeduplicates>
</card>