SQL Server - Concatenate rows into a string

preview_player
Показать описание
This video will show you how to concatenate multiple rows into a single string in SQL SERVER.
Of course there are multiple solutions for this situation, but this is the way I prefer doing it. :)
Рекомендации по теме
Комментарии
Автор

Awesome explanation. I like your step by step approach very much.
I have been searching for 2 hours to apply this logic into a complex query. But Now I am clear. Thanks a lot.

killanasantoshbaba
Автор

Excellent step by step explanation and demo. Very helpful. Thank you for this video.

marshalljackson
Автор

Hello, i want to get this concatenation based on the value in another column. How do i do it?

learnanythingforfree
Автор

step 3 is slightly wrong. you have to cast the field as varchar then add the ', ' else it wont work as it will append the ', ' with the node.

DharmYogi
Автор

Distinct is very expensive operation, it will degrade the performance. The same thing can be achieved with group by

annyusa
join shbcf.ru