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
Get Started with Redwood for Oracle Cloud HCM   Begin Now
To ensure that questions get required attention from community members and are NOT left unanswered, it’s important for the author to indicate (by selecting “Yes” or “No” when prompted) whether the question was answered. (newly added) Please note that it is also important to respond to EACH comment your question receives. Your Yes or No response ensures an accurate status for your question.

For more information, please refer to this announcement explaining best practices for getting answers to questions.

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

edited May 18, 2021 3:18PM in Reporting and Analytics for HCM 9 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!