SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Transforming a vertical name/value to horisontle

By PetterA,

This Script takes any table wich contains rows with names and valus and converts it into a result set with the names as collumn names and the values as values.

Just set @TableName,@vcName,@vcValue to the desired values.

Total article views: 173 | Views in the last 30 days: 2