In the Strategy 2021 release, Parameterized Query is enabled by default for all major gateways. Reports containing text filters and prompts will be executed using parameter markers (?) during SQL execution.
Report executions against Amazon Redshift, PostgreSQL, and DB2 may encounter error “Could not determine data type of parameter #1” when parametrized query is enabled and metric definitions contain COUNT(“*”) syntax.
Sample report SQL indicates the character “*” is parameterized:
select pa11.YEAR_ID YEAR_ID,
avg(pa11.WJXBFS1) WJXBFS1,
count(?) WJXBFS2
from ##TMQL702UKMD000 pa11
group by pa11.YEAR_ID
with parameters:
*
The backend function PrepareStatement needs to know the data type of parameter against above listed data sources. However, with syntax count(?), certain gateways and drivers are not able return the correct type for special characters.
To avoid this issue, users can redefine the metrics as COUNT(1) rather than COUNT(“*”).