Establishing Cube Context

In the expression template shown in 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, 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. That is, to be compliant with OLE DB for OLAP, a provider need not support cross-cube queries. Applications can check the property MDPROP_MDX_JOINCUBES in the DBPROPSET_DATASOURCEINFO property group to determine whether a provider supports this functionality.

For SalesCube, the FROM clause looks like this:

FROM SalesCube