14
Views
3
Comments
Solved
Display comma separated records
Application Type
Reactive

Hello ,

I want to display the roles for the same employee comma separated .

DropDownCheckBox.oap

Rank: #70
Solution

Hi Rahul,


You will need to have a DataAction instead of an aggregate in order to have an advanced query with the STUFF SQL Server command (which concatenates strings).


OML in attachment with your requirements.


Hope it helps.


Regards,
João

DropDownCheckBox.oml

Rank: #89

Hi Rahul,

You need to use advance sql for this.

see below document-

https://stackoverflow.com/questions/21760969/multiple-rows-to-one-comma-separated-value-in-sql-server


SELECT  ID
       ,STUFF((SELECT ', ' + CAST(Value AS VARCHAR(10)) [text()]
         FROM @Table1 
         WHERE ID = t.ID
         FOR XML PATH(''), TYPE)
        .value('.','NVARCHAR(MAX)'),1,2,' ') List_Output
FROM @Table1 t
GROUP BY ID

Hope this will hepl you.

Regards
Rahul


Rank: #70
Solution

Hi Rahul,


You will need to have a DataAction instead of an aggregate in order to have an advanced query with the STUFF SQL Server command (which concatenates strings).


OML in attachment with your requirements.


Hope it helps.


Regards,
João

DropDownCheckBox.oml