title: SQL: creating multiple INSERT statements from a result set
body: <p>I have a SELECT statement that picks a subset of field devices. I need to insert new records into another table , one for each member of this subset. Can you iterate the results of the SELECT clause to create multiple INSERT INTO statements, all within SQL?  Or do I need to create an application for this task?</p>
  
  <p>So if this query :</p>
  
  <pre><code>select name from my_pets
  </code></pre>
  
  <p>returns records for 'pete', 'jack' and 'max', can I continue in SQL:</p>
  
  <pre><code>insert into zoo-table values('pete',x,y,z)
  insert into zoo-table values('jack',a,b,c)
  insert into zoo-table values('max',d,e,f)
  </code></pre>
  
  <p>Seems like there should be a method but I'm far from an SQL master. </p>
  
  <p>thanks...</p>