You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Pass Parameter to Order By condition in Data Model (BI Publisher)

Accepted answer
20
Views
8
Comments
edited May 18, 2021 3:18PM in Reporting and Analytics for HCM 8 comments

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.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!