insert into TABLE_DES(AA,BB) select acct_item_id_seq.NEXTVAL,id,sum(charge) from TABLE_SRC group by id; 就这个语句,报的错是:ORA-02287: sequence number not allowed here
insert into TABLE_DES(AA,BB) select acct_item_id_seq.NEXTVAL,id,sum(charge) from TABLE_SRC group by id; ------------- 你的目标只有两个字段,你怎么插入三个字段?insert into TABLE_DES(newid,AA,BB) select acct_item_id_seq.NEXTVAL,id,cnt from ( select id,sum(charge) as cnt from TABLE_SRC group by id );这样试试看。
就这个语句,报的错是:ORA-02287: sequence number not allowed here
-------------
你的目标只有两个字段,你怎么插入三个字段?insert into TABLE_DES(newid,AA,BB)
select acct_item_id_seq.NEXTVAL,id,cnt
from (
select id,sum(charge) as cnt from TABLE_SRC group by id
);这样试试看。