Collation Order in a GROUP BY clause
From InterBase
Go Up to Specifying Character Sets
When CHAR
or VARCHAR
columns are grouped in a SELECT
statement, it can be necessary to specify a collation order for the grouping, especially if columns used for grouping use different collation orders.
To specify the collation order to use for grouping columns in the GROUP BY
clause, include a COLLATE
clause after the column name. For example, in the following GROUP BY
clause, the collation order for two columns is specified:
. . . GROUP BY LNAME COLLATE FR_CA, FNAME COLLATE FR_CA;
For the complete syntax of the GROUP BY
clause, see SELECT.