Exercise: Using the Union Function

The Union function joins two input sets, optionally retaining duplicates. Syntax:

Union (set, set [,ALL])

Use the Union function to lump two sets together into one set.

  To use the Union function:

  1. Open qry_intersect_func.txt.

  2. Replace Intersect with Union.

  3. Save the query as qry_union_func.txt.

  4. Paste the query into the MaxL Shell and run it.

Results: A comparison of theses query results with the results using the Intersect function (see Exercise: Using the Intersect Function) shows that while Intersect returns a set containing only those children of East that have a UDA of “Major Market,” Union returns {all children of east) + (all Market Members that have a UDA of “Major Market”).

For more examples using pure set-operative functions, see the Oracle Essbase Technical Reference.