Combining Sets

You can accomplish quite a bit with the set-building functions previously described. That said, some logic is much more easily employed through the use of basic set operations.

If you are like us, you were probably first introduced to set operations as a series of overlapping circles referred to as Venn diagrams. These diagrams, presented in Figure 6-1, represent various ways that two sets—visualized as circles in the diagrams—can be combined to form a new set.

Venn diagram representations of the union, intersection, and exception operations

Figure 6-1. Venn diagram representations of the union, intersection, and exception operations

Through the union operation, membership in either the first or the second set confers ...

Get Microsoft® SQL Server® 2008 MDX Step by Step now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.