title: Copying from one table to another using sql (sql*plus)
body: <p>This is something pretty simply and I see there are many posts on the website but I cannot get it to work for me.</p>
  
  <p>Heres what I am trying to do:  Copy from data from table "student".  Student contains three columns: studentID, name, and major.</p>
  
  <p>I need this data copied into another table called "dw_student". </p>
  
  <p>Here is what I have so far for this:</p>
  
  <pre><code>INSERT INTO dw_student (studentID, name, major, studentKey)
  SELECT studentID, name, major, STUDENTSEQ.nextval
  FROM student  
  </code></pre>
  
  <p>Studentseq.nextval assigns a unique number to each row.  It works in other places in my code so far.</p>
  
  <p>Is there anything obvious that I am doing wrong?</p>
  
  <p>Here is Studentseq.nextval:</p>
  
  <pre><code>create sequence STUDENTSEQ increment by 1 start with 4000; 
  drop table holdcounter3; 
  CREATE TABLE holdcounter3 
  ( PKsequence3 number(5), 
   dataname1 char(4), 
   CONSTRAINT pk_sequence3 PRIMARY KEY (PKsequence3) ); 
  </code></pre>