The UNION
row function takes two sets of the same data type and returns a set that is the union of both input sets.
UNION
function is:
UNION(<set1>, <set2>)
where:
mdex:string-set
). For example, set1 can be a multi-assign string attribute.The function "UNION" is not defined for the argument type(s) mdex:string-set, mdex:double-set
In this error case, UNION
was used with a multi-assign string attribute (mdex:string-set
) and a multi-assign double attribute (mdex:double-set
) as inputs.
UNION example
RETURN results AS SELECT WineID AS idRec, UNION(Body, Flavors) AS unionAttrs FROM WineState WHERE WineID BETWEEN 5 AND 9 ORDER BY idRec
idRec unionAttrs ----------------------------------------------------- | 5 | { Blackberry, Earthy, Silky, Tannins, Toast } | | 6 | { Berry, Plum, Robust, Zesty } | | 7 | { Cherry, Pepper, Prune, Silky, Tannins } | | 8 | { Cherry, Oak, Raspberry, Robust } | | 9 | { Earthy, Fruit, Strawberry, Silky, Tannins } | -----------------------------------------------------
To take one set as an example, Record 5 has "Silky" and "Tannins" for its two Body assignments and "Blackberry", "Earthy", and "Toast" for its three Flavors assignments. The resulting set is a union of all five attribute values.