concatenate multiple rows


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       


Re: concatenate multiple rows

Use Recursive function to concatenate

Re: concatenate multiple rows

select distinct id,desc

from table_name

group by id

will this work?