The contents of the DataSet are determined by the QueryResultType.
A DataSet containing tables as requested by the QueryResultType property of the query parameter or null if the QueryResultType property of query is set to None.
The DataSet returned by this method may be null if the QueryResultType property of query is set to None. This is most efficient if attempting to establish the existence of any matching submissions by simply refering to the rowCount out parameter.
If the QueryResultType of query is set to Raw, the DataSet returned will contain a DataTable whose name is given by the RawDataTableName property of query. This table will contain a column for each survey variable requested in the query, and a row for each survey submission.
If the QueryResultType of query is set to Summary, the DataSet returned will contain a DataTable whose name is given by the SummaryDataTableName property of query. This table will have the following structure (order may change):
| IsAggregate | Boolean | Is this row an aggregate (i.e. 'roll-up') summary? |
| Variable | String | Then name of the survey variable. |
| ValueCode | String | The specific value code being summarized if there is a response scale associated with the survey variable. |
| xt1_Variable | String | The name of the cross-tab variable if specified. |
| xt1_ValueCode | String | The specific value code of the cross-tab variable being summarized. Cross-tab variables MUST have a response scale. |
| Count | Int32 | The number of responses. |
| Percentage | Decimal | The percentage of responses with respect to the total number of responses. |
| Min | String | The minimum value. |
| Max | String | The maximum value. |
| Sum | Double | The sum of all responses. |
| Mean | Double | The mean. |
| Median | Double | The median. |
| Variance | Double | The variance. |
| StdDev | Double | The standard deviation. |
| Quartile1 | Double | The first quartile. |
| Quartile3 | Double | The third quartile. |
CAUTION When using the summary table, do not rely on the order of the columns given above as they may change with future releases of the SDK.
The rows present in the summary table will be dependent on the nature of the survey variables specified in the select list of the query. If the survey variable has an associated response option scale, the table will reflect statistics for each possible value of the response option scale as well as a row representing the aggregate of all possible response option scale values.
The cross-tab variable and value code columns are prefixed with "xt1_" to allow for future expansion to multiple cross-tab variables.
For example the following data may be returned for a query with a single variable called SEX which has a response option scale defined as [0 = "Male"] and [1 = "Female"].
| IsAggregate | True | False | False |
| Variable | "SEX" | "SEX" | "SEX" |
| ValueCode | DBNull | 0 | 1 |
| xt1_Variable | DBNull | DBNull | DBNull |
| xt1_ValueCode | DBNull | DBNull | DBNull |
| Count | 22 | 13 | 9 |
| Percentage | DBNull | 59.09... | 40.90... |
| Min | 0 | DBNull | DBNull |
| Max | 1 | DBNull | DBNull |
| Sum | 9 | DBNull | DBNull |
| Mean | 0.40... | DBNull | DBNull |
| Median | 0 | DBNull | DBNull |
| Variance | 0.25... | DBNull | DBNull |
| StdDev | 0.50... | DBNull | DBNull |
| Quartile1 | 0 | DBNull | DBNull |
| Quartile3 | 1 | DBNull | DBNull |
If the above example were extended to include a cross-tab variable called SMOKER which has a response option scale defined as [2 = "Yes"] and [1 = "No"], the table would be extended to include aggregate rows for each possible response to the main variable, SEX, across each of the possible responses for the cross-tab variable, SMOKER, including the null or 'unanswered' response. The full, non-aggregated, interval matrix of counts for each possible combination of the main variable by the cross-tab variable is included as well.
| IsAggregate | True | True | True | True | False | False | False | False | False | False | False | False |
| Variable | "SEX" | "SEX" | "SEX" | "SEX" | "SEX" | "SEX" | "SEX" | "SEX" | "SEX" | "SEX" | "SEX" | "SEX" |
| ValueCode | DBNull | DBNull | DBNull | DBNull | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| xt1_Variable | DBNull | "SMOKER" | "SMOKER" | "SMOKER" | DBNull | "SMOKER" | "SMOKER" | "SMOKER" | DBNull | "SMOKER" | "SMOKER" | "SMOKER" |
| xt1_ValueCode | DBNull | 2 | 1 | DBNull | DBNull | 2 | 1 | DBNull | DBNull | 2 | 1 | DBNull |
| Count | 22 | 7 | 10 | 5 | 13 | 4 | 5 | 4 | 9 | 3 | 5 | 1 |
| Percentage | DBNull | DBNull | DBNull | DBNull | 59.09... | 57.14... | 50.00... | 80.0 | 40.90... | 42.85... | 50.0 | 20.0 |
| Min | 0 | 0 | 0 | 0 | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull |
| Max | 1 | 1 | 1 | 1 | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull |
| Sum | 9 | 3 | 5 | 1 | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull |
| Mean | 0.40... | 0.42... | 0.5 | 0.2 | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull |
| Median | 0 | 0 | 0.5 | 0 | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull |
| Variance | 0.25... | 0.28... | 0.27... | 0.2 | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull |
| StdDev | 0.50... | 0.53... | 0.52... | 0.44... | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull |
| Quartile1 | 0 | 0 | 0 | 0 | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull |
| Quartile3 | 1 | 1 | 1 | 0.5 | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull | DBNull |
If more than one variable is selected for the query, the series of rows described above is simply repeated for each variable selected. If the select variable does not have a response option scale, only aggregate rows will be returned. When a statistic in an aggregate row cannot be computed, the value in the table will be DBNull.
If the QueryResultType of query is set to RawWithSummary, the DataSet returned will contain a DataTable whose name is given by the RawDataTableName property of query and a DataTable whose name is given by SummaryDataTableName as described above.
WebServiceContext Class | DatStat.SDK.WebServiceWrappers Namespace | WebServiceContext.ExecuteQuery Overload List