How to get inbuilt function for comma separated column values in sql in DB2 , e.g if there are columns with this policy id and it has 3 rows with the same id but have three different roles in three rows , then it should retrieve the rows in one row "3,4,5"
e.g.
1. 4555 "2"
2. 4555 "3"
3. 4555 "4"
output 4555 2,3,4
in a DB2 in one row
I think with this smaller query, you can do what you want. This is equivalent of MySQL's GROUP_CONCAT in DB2.
This will output something like:
assumming your original result was something like that: