RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDecisionCube.GetSQL Method

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

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

Use the SQL statement returned by GetSQL to view the data that gave rise to a subset of the information in the decision cube. The resulting query produces a dataset containing the projection described by the ValueArray parameter. All the summaries of the current dataset are included in the resulting query. 

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. 

To further restrict the dataset so that it includes only a subset of the dimensions in the decision cube, use the GetDetailSQL method. 

 

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