Grouping by Expressions
Grouping by Expressions
A type=”grouping” data source with a calculated field that evaluates to include a bind variable as a parameter to a function, or a custom query of the following pattern won't work with bind variables:
SELECT somefunction(?) FROM table GROUP BY somefunction(?)
The DBMS doesn’t correlate the two bind variables, so this is a syntax error. It can be fixed by restructuring the query:
SELECT field FROM (SELECT somefunction(?) field FROM table) table GROUP BY field
Custom queries need to be modified directly, but data sources of type=“grouping” can change to type=“groupingSubquery” in v2024.02.
Note: This isn't a problem for sorting or other patterns, only grouping.
