posted 18 years ago
insert into TABLE1( ID, COL1, COL2) select id_seq.nextval, COL1,COL2, from TABLE2 GROUP BY id_seq.nextval,COL1, COL2
this gives an error saying
ORA-02287: sequence number not allowed here
Because of performance issues, I am not using a ResultSet to get the data and iterate and generate the Id.
Is there any other way i can achieve this?
What I want to do is, select columns from one table with group by, and then insert into the second table with generated ids.