title: SQL Server + Inserting values from a select statement into a table
body: <p>is it possible to do this:</p>
  
  <pre><code>SELECT UserName FROM payroll p
  INNER JOIN aspnet_Users u
  ON (p.staffId= u.UserId)
  WHERE jobId = '1011'
  </code></pre>
  
  <p>For example if the above select returns say 3 results: john001, mary002, peter003</p>
  
  <p>How can I use it to insert the individual results into my table(Notification) columns? In this case, only the [Recipient] column will have different values and will be the results return from the above Select statement.</p>
  
  <pre><code>INSERT INTO [Notification]
  (
  [Recipient], 
  [Message],
  [Type],
  [DateCreated]
  )
  VALUES
  (
  -- The results from the select statement
  'Testing Message'
  'Type1,
  GETUTCDATE()
  )
  </code></pre>
  
  <p>So end up I should have these columns in my Notification table:</p>
  
  <pre><code>john001, Testing Message, Type1, 10/10/1945
  mary002, Testing Message, Type1, 10/10/1945
  peter003, Testing Message, Type1, 10/10/1945
  </code></pre>
  
  <p>Thanks in advance.</p>