Categories
Example of how to enable the passing of multiple-values via a parameter using Publisher

If you search support.oracle.com for Doc ID 2020360.1 you will find a note regarding this, but the example provided is very simplistic. My example is based on the sample SH schema that comes standard in Autonomous DWHS. The first thing I will share is this is my query underlying my report data model:
select "SALES"."AMOUNT_SOLD" as "AMOUNT_SOLD",
"SALES"."QUANTITY_SOLD" as "QUANTITY_SOLD",
"PRODUCTS"."PROD_NAME" as "PROD_NAME",
"PRODUCTS"."PROD_DESC" as "PROD_DESC",
"PRODUCTS"."PROD_CATEGORY" as "PROD_CATEGORY",
"PRODUCTS"."PROD_SUBCATEGORY" as "PROD_SUBCATEGORY"
from "SH"."PRODUCTS" "PRODUCTS",
"SH"."SALES" "SALES"
where "PRODUCTS"."PROD_ID"="SALES"."PROD_ID"
and ((COALESCE(null, :Prod_Cat) is null) OR (PROD_CATEGORY IN (:Prod_Cat)))
I've boldfaced the beginning / ending parens here because the example noted under support Doc ID 2020360.1 left off the 3rd paren on the RHS which confused me when I tried to replicate things using my own data model. The illustration below shows how my data set, list of values and parameter is set up in the Publisher data model:
Also, in case you need it here is the query that populates the Prod_Cat list of values:
select "PRODUCTS"."PROD_CATEGORY" as "PROD_CATEGORY"
from "SH"."PRODUCTS" "PRODUCTS"
group by "PRODUCTS"."PROD_CATEGORY"
Comments
-
Hello John,
This works wonders! Do you mind share any tips to apply multiple-values for parameter type text?
Regards,
Affan
0 -
0