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

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/
Venkatesan Jayakantham

I am Venkatesan Prabu Jayakantham(SQL Server DBA and Dotnet developer) from India (Tamil Nadu). A Microsoft SQL Server MVP,MCITP,MCTS,MCAD,CCNA,QAI certified Expert.  I am a Mindcracker MVP for the year 2010. &nbs... Read more

COMMENT USING