title: How to create a temperory table with out knowing the number of column and column name
body: <p>I have a result using sql pivotand now i want this to be copied to temperory table. How can i create temp table on the fly and insert the data.i have added the output of my dynamic query</p>
  
  <pre><code>select
  testresultid,customername
  , MAX([val1])  AS [val1],MAX([11]) AS [val2],MAX([11]) AS [val2],MAX([11]) 
  </code></pre>