Pass Parameter to Order By condition in Data Model (BI Publisher)
Summary
I'm trying to configure a Data Model to use a Parameter. I want a user to be able to choose a column to Order By.Content
Hi,
I'm trying to configure a Data Model to use a Parameter. I want a user to be able to choose a column to Order By.
The SQL below works fine.
select
"ALL_TABLES"."TABLE_NAME" as "TABLE_NAME",
"ALL_TABLES"."TABLESPACE_NAME" as "TABLESPACE_NAME",
CAST("ALL_TABLES"."NUM_ROWS" AS INT) as "NUM_ROWS",
from "FUSION"."ALL_TABLES" "ALL_TABLES"
where "NUM_ROWS" >= 0
order by "NUM_ROWS" DESC
If I set a parameter p_order_by to be a String and then type NUM_ROWS into the resulting parameter box the Order By clause fails.
Tagged:
1