CREATE TABLE #temp(Names varchar(10),Description varchar(20))
insert
into #temp values('suresh','dfsdf')
insert into #temp values('vijayans','12212')
insert into #temp values('suresh','232132')
insert into #temp values('suresh','=====')
insert into #temp values('vijayans','10000')SELECT
Names
,

REPLACE(RTRIM((SELECT [description] + ' ' FROM #temp WHERE (Names = Results.Names) FOR XML PATH (''))),' ',', ') AS NameValues FROM #temp Results GROUP BY NAMES


DROP
TABLE #temp

Comments (0)