RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDecisionCube.GetDetailSQL Method

Returns an SQL statement that can be used to generate the described subset of the data in the decision cube.

Pascal
function GetDetailSQL(ValueArray: TSmallIntArray; SelectList: string; bActive: Boolean): string;
C++
__fastcall AnsiString GetDetailSQL(TSmallIntArray ValueArray, AnsiString SelectList, Boolean bActive);

Use the SQL statement returned by GetDetailSQL to generate a dataset that represents the records that gave rise to a subset of the values in the decision cube. The resulting query produces the records represented in the projection described by the ValueArray parameter. The dataset will include all fields that make up the dimensions of the decision cube, plus any fields listed in the SelectList parameter. The query does not include any summary values or grouping, such as must be imposed by the dataset of the decision cube. 

Each entry in the ValueArray parameter corresponds to a dimension of the decision cube, where the first entry corresponds to the first dimension, the second entry corresponds to the second dimension, and so on. If the value of an entry in the value array is less than 0, all field values over that dimension are included in the new dataset. If the value of an entry in the value array is equal to or greater than 0, it is interpreted as the index of a value over the dimension field. When the ValueArray specifies a field value, the SQL statement restricts the dataset to records that match that value on the corresponding field of the original database table. Thus, ValueArray represents the dimension array with a set of drilled dimensions. 

bActive specifies whether the ValueArray parameter includes inactive dimensions. Only active dimensions are included when bActive is true. Also when bActive is true, only the fields that correspond to active dimensions are included automatically in the SQL query. 

The SelectList parameter is a list of comma delimited field names for the fields that are included in the result set of the SQL query. The query always includes the fields that correspond to the dimensions represented by the ValueArray parameter. If SelectList consists of a single asterisk (*), all the fields in the original dataset are included. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!