title: Work around temporary table in SQL Server 2008 view
body: <p>I wrote a query in this format..</p>
  
  <pre><code>Select * INTO #xyz FROM ()
  </code></pre>
  
  <p>which I later want to use to create a view, as...</p>
  
  <pre><code>CREATE VIEW aaa
  AS 
     Select * INTO #xyz FROM ()
  </code></pre>
  
  <p>but getting the following errors:</p>
  
  <ol>
  <li>Incorrect syntax near the keyword 'INTO'.</li>
  <li>Views or functions are not allowed on temporary tables</li>
  </ol>
  
  <p>Can someone please suggest a workaround this? Is it possible to use temporary tables to create views?</p>