Search This Blog & Web

Friday, May 22, 2009

Returning Comma seperated Values in SQL Server 2005

Declare @vComma Varchar(max);

Select @vComma = COALESCE(@vComma+';','') + column1 from table1

select @vComma

I have 5 values in Unique table against Val column and this command will return all values as ; seperated


Post a Comment