title: Oracle: Normalizing data during migration
body: <p>I have a table with a lot of repeated data that I'd like to refactor as 3 tables.</p>
  
  <p>Current structure looks like:</p>
  
  <pre><code>meeting_desc
  meeting_date
  topic_desc
  ...
  </code></pre>
  
  <p>And the data in the current_table looks like:</p>
  
  <pre><code>meeting1,2/3/2009,abc
  meeting1,2/3/2009,efg
  meeting1,2/3/2009,xyz
  meeting2,4/5/2009,aaa
  meeting2,4/5/2009,bbb
  </code></pre>
  
  <p>I would like to create a meeting table and a topic table, with PKs coming from a sequence:</p>
  
  <pre><code>MEETING: 
    id
    meeting_desc
    meeting_date
  
  TOPIC:
    id
    meeting_id
    topic_desc
  </code></pre>
  
  <p>What I can't figure out is how to insert data into the new tables.  I've tried:</p>
  
  <pre><code>insert into MEETING select distinct 
    seq.nextval, meeting_desc, meeting_date from current_table
  </code></pre>
  
  <p>but of course that doesn't work.  Is there an easy way to normalize the data?</p>