title: How to insert multiple select statements into a temp table
body: <p>I am having three tables with different data and i need to insert into one TEMP table and return that table in StoredProcedure.</p>
  
  <p>I tried as:</p>
  
  <pre><code>-- To get last 10 Days Letters count
  SELECT col1,col2,1 AS Type, LettersCount
  INTO #temp FROM tblData
  
  -- To get last 4 weeks Letters count
  SELECT col1,col2,2 AS Type, LettersCount
  INTO #temp FROM tblData
  
  -- To get month wise Letters count
  SELECT col1,col2,3 AS Type, LettersCount
  INTO #temp FROM tblData
  </code></pre>
  
  <p>Showing Error as</p>
  
  <pre><code>Msg 2714, Level 16, State 1, Line 16
  There is already an object named '#temp ' in the database.
  Msg 102, Level 15, State 1, Line 24
  Incorrect syntax near 'T'.
  Msg 2714, Level 16, State 1, Line 32
  There is already an object named '#temp ' in the database.
  </code></pre>