title: Insert into table with select statement plus additional column in SQL Server 2008
body: <p>I am trying to insert into a table from a select statement as well as add additional parameters to the rows with something like-</p>
  
  <pre><code>SELECT 
          Appt_ID,
          Pracitioner_ID,
          Appt_Book_ID,
          Start_Time,
          UR_NO,
          [Type],
         [Description]
  FROM @TempWaiting,
   @EndTime,
   @PatientID, 
   @Title, 
   @FirstName, 
   @LastName, 
   @Surname, 
   @DOB
  INTO PS_WAITING_LIST(Appt_ID,   
          Pracitioner_ID,
          Appt_Book_ID,
          Start_Time,
          UR_NO,
          [Type],
          [Description],
          End_Time,
          Patient_ID, 
          Title,
          First_Name,
          Middle_Name,
          Surname,
          DOB)
  </code></pre>
  
  <p>This is within a stored procedure and all it says is error after INTO.</p>
  
  <p>I also tried re-writing it as - </p>
  
  <pre><code>insert into PS_WAITING_LIST (
          Appt_ID,    
          Pracitioner_ID,
          Appt_Book_ID,
          Start_Time,
          UR_NO,
          [Type],
          [Description],
          End_Time,
          Patient_ID, 
          Title,
          First_Name,
          Middle_Name,
          Surname,
          DOB)
  SELECT 
          Appt_ID,
          Pracitioner_ID,
          Appt_Book_ID,
          Start_Time,
          UR_NO,
          [Type],
          [Description]
  FROM @TempWaiting,
   @EndTime,
   @PatientID, 
   @Title, 
   @FirstName, 
   @LastName, 
   @Surname, 
   @DOB
  </code></pre>
  
  <p>This throws an error saying the number of select value must match the number of insert column. Well obviously that does not.</p>
  
  <p>I also tried Insert into table (col1, col2..) Select * from (select (...), col3, col9)</p>