DRILLTHROUGH Statement

Analysis Services Programming

Analysis Services Programming

DRILLTHROUGH Statement

This statement retrieves the source rowset(s) from the fact table (that is, data source) for a specified tuple.

BNF

<drillthrough>        := DRILLTHROUGH [<Max_Rows>] [<First_Rowset>] <MDX select>

    < Max_Rows>    := MAXROWS <positive number>

    <First_Rowset>    := FIRSTROWSET <positive number>

Remarks

This statement allows the client application to retrieve the rowsets that were used to create a specified cell in a cube. A Multidimensional Expressions (MDX) statement is used to specify the subject cell. If this cell is at an atomic level (that is, at the lowest level of its hierarchy), only one rowset is returned. If this cube is not at an atomic level, all of the rowsets that make up the source data of that cell are returned. The total number of rowsets returned can also be affected by use of the MAXROWS and FIRSTROWSET modifiers.

The value specified by the MAXROWS modifier indicates the maximum number of rows that should be returned by the resulting rowset. This modifier should only be used if the original source data's OLE DB provider supports the DBPROP_MAXROWS property.

The value specified by the FIRSTROWSET modifier specifies the first rowset to return. Use of this modifier is not recommended unless the client application designer does not wish to use the OLE DB IMultipleResults interface or the Microsoft® ActiveX® Data Objects (ADO) NextRecordset method to navigate the returned rowsets.

For more information, see Using DRILLTHROUGH to Retrieve Source Data.