O'Reilly logo

Microsoft® SQL Server® 2008 MDX Step by Step by C Ryan Clay Bryan C Smith and Hitachi Consulting

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4 Quick Reference

To

Do this

Assemble a fixed set of tuples

Assemble the tuples in a comma-delimited list of tuples and enclose the list in braces ({ }). For example:

{
    ([Product].[Category].[Accessories]),
    ([Product].[Category].[Bikes])
}

Each tuple in the set must contain the same number of member references from the same hierarchies, and those hierarchies must be referenced in the same order.

Assemble the set of all members from a hierarchy or hierarchy level

Append the Members function to the name of the hierarchy or hierarchy level, as demonstrated here:

[Product].[Category].Members
[Product].[Category].[Category].Members

Remove duplicate tuples from a set

Use the Distinct function with a set. For example:

SELECT Distinct( { ([Product].[Category].[Bikes]), ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required