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