title: In SQL Server, how do I select IDs where value is in list, then insert matching IDs into join table?
body: <p>I am trying to connect a <code>select</code> and an <code>insert</code> in Query Manager    </p>
  
  <p>How can the two queries be tied together so that the <code>insert</code> happens for each match?</p>
  
  <p>How can we call the results to verify that matching record IDs were inserted, and non-matching list items were not?</p>
  
  <pre><code>SELECT table1.ID  
  FROM    table1  
  WHERE table1.Name IN  ('Anne', 'Bob', 'Carol', 'Dave')  
  
  INSERT INTO joinTable  
      (joinTable.table1_fk, joinTable.table2_fk)  
  VALUES (table1.ID,1)  
  </code></pre>