Establishing Cube Context

In the expression template shown in the section “Parts of an MDX Statement,” the FROM cube_specification clause specifies the cubes to query. The cube specification is just the name of the cube. If multiple cubes are involved, then it is the comma-separated list of those cube names.

Note   The ability to query across more than one cube is not part of core level MDX language. In other words, a provider need not support cross-cube queries in order to be compliant with OLE DB for OLAP. Applications can check the property MDPROP_JOINCUBES in the DBPROPSET_DATASOURCEINFO property group to find out if a provider supports this functionality.

For SalesCube, the FROM clause looks like this:

FROM SalesCube