How to convert rows to columns. | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

How to convert rows to columns.

How to convert rows to columns and columns to rows????
Crosstab reports. —
Frank Kalis
Microsoft SQL Server MVP
I have checked that but I don’t think it is the correct solution..Could you please provide better solution..
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><br />Could you please provide better solution..<br /><hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote"><br />Sure! But first you should provide a better (read more precise) question. [<img src=’/community/emoticons/emotion-5.gif’ alt=’;)‘ />]<br /><br />–<br />Frank Kalis<br />Moderator<br />Microsoft SQL Server MVP<br />Webmaster:<a target="_blank" href=></a>
Do you need to create a new table with columns based on the rows from the original table? In that case, setup the crosstab query, and add the INTO new_table clause immediately before the FROM keyword.
Read about Cross-tab Reports in sql server help file.
Or post some sample data and the result you want Madhivanan Failing to plan is Planning to fail