All Forums Analytics
salla.ravinder 1 post Joined 11/15
06 Nov 2015
concatenate multiple rows

Hello All,
Below is the sample data of what I have.
ID      desc
1        AB
1        AF
1        DF
2        wer
2        try
3       qw
4        yu
I want to summarize at ID level and the result should look something like this.
ID       Summary
1         AB,AF,DF
2         wer,try
3         qw,yu
 
Can someone please help me with this query. I have looked at concatenate but its not helping. Thanks a lot       

yuvaevergreen 93 posts Joined 07/09
11 May 2016

Use Recursive function to concatenate

TDMGUSER 7 posts Joined 05/16
18 May 2016

select distinct id,desc
from table_name
group by id
 
will this work?

You must sign in to leave a comment.