SQL/MX 3.x Query Guide (H06.22+, J06.11+)

SQL/MX Operators
HP NonStop SQL/MX Query Guide640323-001
7-77
UNARY_UNION Operator
The following is an example of the TUPLELIST operator:
PREPARE TestQuery21 FROM
INSERT INTO nation
VALUES (43, 'botswana', 16, 'african country'),
(44, 'france', 23, 'european country'),
(45, 'nepal', 88, 'asian country');
DESCRIPTION
fragment_id ............ 0
parent_frag ............ (none)
fragment_type .......... master
tuple_expr ............. cast(%(45) AS INTEGER SIGNED),
cast(%('nepal') AS VARCHAR(25)
CHARACTER SET ISO88591), cast(%(88)
AS INTEGER SIGNED),
cast(%('asian country') AS
VARCHAR(152) CHARACTER
SET ISO88591)
UNARY_UNION Operator
The UNARY_UNION operator first evaluates the request using the condition
expression (condExpr) associated to the operator. If the result is true, it passes the
request to its child. In this case the UNARY_UNION operator always has one child.
The description field for this operator contains:
Token Followed by... Data type
fragment_id A sequential number assigned to the fragment.
0 is always the master executor and 1 is
reserved for the EXPLAIN plan. Numbers 2 to n
will be ESP or DAM fragments.
integer
parent_frag The fragment_id for the parent of the current
fragment. The value is (none) for the master
executor.
integer
fragment_type Master, ESP, or DP2. text
sort_order Sort order of the result of the union. text
merge_expression Expression used to determine which child
operator to read from next—read from left if true
and read from right if false.
expr(text)
union_type Merge, physical or unspecified. text
condExpr Expression used for conditional union. Occurs
with the IF statement in compound statements.
expr(text)
trigExceptExpr Expression used for trigger exceptions. expr(text)