Tuesday, April 20, 2010

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  

Post a Comment

Security Framework

I've created a new repository on GitHub . The project is a security framework for asp.net mvc projects. You can find it th following ...