COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: david27 on 14 Sep 2019 11:57:00 AM

Title: Split nested values in a data item into separate rows
Post by: david27 on 14 Sep 2019 11:57:00 AM
Hi I have a single data item (from promptmany) that contains multiple variable values:

123
456
789

I need to split these into separate rows.
.
Any ideas?

Thanks

Title: Re: Split nested values in a data item into separate rows
Post by: david27 on 14 Sep 2019 02:03:38 PM
Should say I'm on C11.0.3, happy to dive into sql if no solution via the data model. My data items could be 1000+ so I have dumped the promptmany into a data item.

I'm looking for something like this:

1
SELECT
2
    parameterValue
3
FROM (VALUES
4
  (#join('),(',split(',',promptmany('Scenarios','string',sq('N/A'))))#)
5
    ) query(parameterValue)

But to allow more than 1000 values coming in from the promptmany.