3 Replies Latest reply: Jun 13, 2018 5:59 PM by Taher Talib RSS

    Merge Multiple Rows Into a single Comma Separated Row

    Taher Talib

      Hi

       

      In a straight table, i have the below data:

       

      NameNumberDateCostCountry
      ABC Enterprise123413-JUN-18100USA
      ABC Enterprise123413-JUN-18100UK
      ABC Enterprise123413-JUN-18100FRANCE

       

      If i remove the Country column, then i only get one row.

      How can i add the country column and make the row comma separated so that i get only one row? like below:

       

      NameNumberDateCostCountry
      ABC Enterprise123413-JUN-18100USA,UK,FRANCE

       

      I also need only distinct countries to be displayed.

      I tried "CONCAT(COUNTRY,',') , but its not working.

       

      Any help would be appreciated.

       

      Thanks

      Taher