In ORACLE, there is a function called "TRANSLATE" which changes all rows into columns, all columns into rows (switch rows and columns) in a table. I am wandering if there is similar function in SQL Server?
This operation is called pivoting. It is not supported by the current version of SQL Server but you can do it with one SELECT statement, one table scan. Check this link for an example; it is a PowerPoint presentation: