COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: Przemek on 26 Sep 2018 04:30:48 AM

Title: Mulitply rows by qunatity column
Post by: Przemek on 26 Sep 2018 04:30:48 AM
Hi there,

I would like to ask you a question. Maybe someone try to do this in Cognos itself already.

There is an construction you can build in Oracle DB like below:
SELECT *
  FROM (SELECT 'line' COLUMN1, 8 QTY FROM DUAL) Q
       JOIN (    SELECT LEVEL N
                   FROM DUAL
             CONNECT BY LEVEL <= 100)
          ON N <= Q.QTY


This will muliply every record by number of QTY column.
How can I do this if I will have query like below:
SELECT column1, qty from table
and would like to muliply every record in Cognos using the number from QTY column?
Title: Re: Mulitply rows by qunatity column
Post by: Przemek on 01 Oct 2018 02:54:51 AM
Kind reminder. Has anyone have any idea?
Title: Re: Mulitply rows by qunatity column
Post by: bdbits on 01 Oct 2018 05:15:08 PM
Does this produce a tally table? I have used such a technique in ETL processes, but not inside a reporting tool. In fact I am not certain why you would need it. What is the goal you want to accomplish? Or are you just wondering?