GROUP BY Support Property

ADO and SQL Server

ADO and SQL Server

GROUP BY Support Property

The GROUP BY Support property indicates the relationship between the columns in a GROUP BY clause and the nonaggregated columns in a SELECT statement.

Applies To
Connection Object
Syntax

object.Properties("GROUP BY Support")

Parts

object

Expression that evaluates to an object in the Applies To list.

Returns

One of the following settings:

Constant Description
DBPROPVAL_GB_EQUALS_SELECT The GROUP BY clause must contain all nonaggregated columns in the select list. It cannot contain any other columns (for example, SELECT DEPT, MAX(SALARY) FROM EMPLOYEE GROUP BY DEPT).
DBPROPVAL_GB_COLLATE A COLLATE clause can be specified at the end of each grouping column.
DBPROPVAL_GB_CONTAINS_SELECT The GROUP BY clause must contain all nonaggregated columns in the select list. It can contain columns that are not in the select list (for example, SELECT DEPT, MAX(SALARY) FROM EMPLOYEE GROUP BY DEPT, AGE).
DBPROPVAL_GB_NO_RELATION The columns in the GROUP BY clause and the SELECT statement are not related (for example, SELECT DEPT, SALARY FROM EMPLOYEE GROUP BY DEPT, AGE).

Data Type

adInteger

Modifiable

Read-only

OLE DB Property

DBPROP_GROUPBY