Rows to single column in Sql
Sample table as Cities in rows is convert to single column
declare @retstr varchar(8000) select Top 5 @retstr = COALESCE(@retstr + ';','') + City from State print @retstr
Comments
Post a Comment