title: Using "WITH AS" keywords when migrating data in SQL
body: <p>Is it possible to do this in SQL?</p>
  
  <p>If I remove the INSERT statement the SELECT works, if I have the insert Oracle complains that "missing SELECT keyword".</p>
  
  <pre><code>WITH tmpdata AS
  (
  //SOME arbitrary select statement
  )
  
  INSERT INTO myTable (someId, somevalue, someothervalue)
  SELECT
   mysequence.nextval,
   tmpData.somevalue,
   tmpData.someothervalue,
  FROM
   tmpdata,
   sometabletojoin
  WHERE
   tmpdata.somevalue = sometabletojoin.somevaluebutintheothertable
  </code></pre>