Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

How to list items Comma Separated in BIP for Word RTF?

Received Response
343
Views
2
Comments

Summary

How to list items Comma Separated in BIP for Word RTF?

Content

Hi All,

I have data that currently lists in a table as

AAE

AAP

AID

AMD

AOB

ARC

ARD

ARN

BPD

CCM

CDB

CDV

CE

CMD

CRD

CSD

CVE

I'd like it to list comma separated as a paragraph instead like this:

AAE, AAP, AFT, ARN, BPD, CCM, CDB, CDV, CE, CEN, CMD, CRC, CRD, CVE

How can I do this in BI Publisher for Word RTF?

Thanks,

John

Answers

  • Rank 6 - Analytics Lead

    Thanks Sven,

    I ended up using your SQL listagg in a PS Query expression. Works great.

    John

  • Rank 4 - Community Specialist

    There are two different ways...

    Do it in the data model (more efficent ):

    <span class="kwd">select</span><span class="pln"> listagg</span><span class="pun">(</span>element<span class="pun">,</span><span class="str">', '</span><span class="pun">)</span><span class="pln"> </span><span class="kwd">within</span><span class="pln"> </span><span class="kwd">group</span><span class="pun">(</span><span class="kwd">order</span><span class="pln"> </span><span class="kwd">by</span><span class="pln"> group_set</span><span class="pun">)</span><span class="pln"> csv<br/>  </span><span class="kwd">from</span><span class="pln"> table</span><span class="pun">;</span>

    Do it in the template:

    <?for-each:GROUP_SET?><?ELEMENT?>, <?END FOR-EACH?>

    Publisher will repeat everything inside the FOR-EACH-TAG as often as there are GROUP_SETs to loop over.

Welcome!

It looks like you're new here. Sign in or register to get started.