Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

concatenate rows value

$
0
0

Dear all,
I have been given a SQL view which looks like:

USER GROUP
101 Red
101 Green
101 Blue
102 Red
102 Blue
103 Green
104 Blue
104 Red
105 Red
105 Blue
105 Green
105 Yellow

What will be the TSQL to display the data like this ?

USER GROUP
101 Red Green Blue
102 Red Blue
103 Green
104 Blue Red
105 Red Blue Green Yellow

Any help would be much appreciated, thank you.


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>