GROUPING function [Aggregate]

Function

Identifies whether a column in a ROLLUP or CUBE operation result set is NULL because it is part of a subtotal row, or NULL because of the underlying data.

Syntax

GROUPING ( group-by-expression )

Parameters

group-by-expression An expression appearing as a grouping column in the result set of a query that uses a GROUP BY clause with the ROLLUP or CUBE keyword. The function identifies subtotal rows added to the result set by a ROLLUP or CUBE operation.

Return value

Standards and compatibility

See also

SELECT statement in Chapter 6, “SQL Statements” in Sybase IQ Reference Manual