Blog

Concatenate row data into a single data in SQL Server

By Venkatesan Jayakantham Apr 30 2011
Concatenate row data into a single data in SQL Server
    • Like
    • Love It
    • Awesome
    • Interesting
    • It's Okay
    • Thumbs Down
  • 3.9k
  • 0

How to concatenate the row data into a single data?

 [CODE]
DECLARE @NAME VARCHAR(100) =''
SELECT @NAME= @NAME + ',' + NAME   FROM VENKAT_NAME_TABLE
SELECT SUBSTRING(@NAME,1,LEN(@NAME))
[/CODE]
Cheers,
Venkatesan Prabu .J
Head - www.kaashivinfotech.com
http://venkattechnicalblog.blogspot.com/