Original Message:
Sent: Thu May 04, 2023 12:09 PM
From: Marc Reed
Subject: Handling Parameters from Oracle SQL to Cognos
#promptmany( 'p_ProdLine', 'string', '1=1' , '[Product Line] in (', '', ')' )#
------------------------------
Marc Reed
Original Message:
Sent: Thu May 04, 2023 10:30 AM
From: P S
Subject: Handling Parameters from Oracle SQL to Cognos
Hi Marc,
Thanks!!
I have another parameter where we need to select companies at the query level.
so far using macros I' am able to achieve single or multiple companies using " in (#promptmany('Companies')#)",
now how can we pass the "All" static choice (selecting all companies as default) in macros at the query level?
------------------------------
P S
Original Message:
Sent: Thu May 04, 2023 10:20 AM
From: Marc Reed
Subject: Handling Parameters from Oracle SQL to Cognos
Your original problem only has a single parameter - vAsOfDate.
What would 'every option' for that date be?
------------------------------
Marc Reed
Original Message:
Sent: Thu May 04, 2023 09:56 AM
From: P S
Subject: Handling Parameters from Oracle SQL to Cognos
Thanks, John
As you guys said I' am using Macros to handle those parameters in the query level itself.
Is it possible to keep Static choices like "All" in the macros in the query level to select every option from the prompt page?
------------------------------
P S
Original Message:
Sent: Wed May 03, 2023 08:26 AM
From: Sanish John
Subject: Handling Parameters from Oracle SQL to Cognos
If this is in Framework Manager, you could try something like this:
SELECT I.COMPANY, I.VENDOR, I.IDTE AS "IDATE", I.PDATE AS "PDATE", I.DDATE AS "DDATE"FROM TABLE I LEFT JOIN TABLE2 P ON I.COM = P.COM AND I.VENDOR = P.VENDOR AND P.DATE <= #SQ(PROMPT('vAsOfDate', 'date'))# AND (P.VDATE > #SQ(PROMPT('vAsOfDate', 'date'))# OR P.VDATE <= '01-JAN-1900' OR P.VDATE IS NULL)
------------------------------
Sanish John
Original Message:
Sent: Tue May 02, 2023 11:02 AM
From: P S
Subject: Handling Parameters from Oracle SQL to Cognos
Hi guys,
we have a report in Cognos that is purely SQL query based one,
I am facing an issue with the query now, ETL team shared the updated query for the report
the query looks like this:
select
i.company,i.vendor,i.idte as "IDATE",i.pdate as "PDATE",i.ddate as "DDATE"
from Table i
left join Table2 p ON
i.com = p.com AND
i.VENDOR = p.VENDOR AND
p.DATE <= :vAsOfDate AND
(p.vDATE > :vAsOfDate OR
p.vDATE <= '01-JAN-1900' OR
p.vDATE is NULL)
the highlighted in yellow " :vAsOfDate " is the parameter/variable that the ETL team is dynamically giving inputs to query
those parameters are in join conditions.
how can we tackle these parameters at the report level?
if they were in where condition in the query, I would have kept them in the Detail filter but those parameters are in join conditions.
please help me figure this out, thanks!!
------------------------------
P S
------------------------------