Zoomed Image

AMSX Scripting Language - Command : SqlStatement.SetOrderByToGroupBy

Summary

Copy the GROUP BY fields into the ORDER BY clause of a SQL statement variable

Description

Sets the ORDER BY clause to match the current GROUP BY fields. Pass true to exclude ID fields from the sort order, which is useful when grouping by descriptive columns alongside surrogate keys.

Parameters

ParameterDescription
cmdSQL statement variable name
Argument 0true to exclude ID fields from the ORDER BY, false to include them

Syntax


SqlStatement.SetOrderByToGroupBy "SQL statement variable name", "true to exclude ID fields from the ORDER BY, false to include them"

Return to the AMSX Command Reference