title: Displaying Columns as Rows in SQL Server 2005
body: <p>I have read dozens of solutions to similar transposition problems as the one I am about to propose but oddly none that exactly mirrors my issue. I am simply trying to flip my rows to columns in a simple dashboard type data set.</p>
  
  <p>The data when pulled from various transaction tables looks like this:</p>
  
  <pre><code>DatePeriod  PeriodNumberOverall   Transactions   Customers   Visits
  
  'Jan 2012'   1                    100            50          150
  'Feb 2012'   2                    200            100         300
  'Mar 2012'   3                    300            200         600
  </code></pre>
  
  <p>and I want to be able to generate the following:</p>
  
  <pre><code>                      Jan 2012   Feb 2012   Mar 2012
  
  Transactions          100        200        300
  Customers             50         100        200
  Visits                150        300        600
  </code></pre>
  
  <p>The metrics will be static (Transactions, Customers and Visits), but the date periods will be dynamic (IE - more added as months go by).</p>
  
  <p>Again, I have ready many examples leveraging pivot, unpivot, store procedures, UNION ALLs, etc, but nothing where I am not doing any aggregating, just literally transposing the whole output. I have also found an easy way to do this in Visual Studio 2005 using a matrix with an embedded list, but I can't export the final output to excel which is a requirement. Any help would be greatly appreciated.</p>