insert into
tablea (field1,field2...)
select
seq_manager.nextval,
t.name,
t.text
from
tableb t

解决方案 »

  1.   

    我已经把字段加上了还是一样报错;
    Error: PL/SQL: ORA-02287: 此处不允许序号
    Line: 31
    Text: seq_manager.nextval,Error: PL/SQL: ORA-02287: 此处不允许序号
    Line: 133
    Text: seq_manager.nextval,
      

  2.   

    ORA-02287 sequence number not allowed hereCause: The specified sequence number reference, CURRVAL or NEXTVAL, is inappropriate at this point in the statement.Action: Check the syntax. Then remove or relocate the sequence number.
      

  3.   

    我想你可以试试这样做:
    insert into
               tablea
       (select 
          seq_manager.nextval,
          t.name,
          t.text
        from
          tableb t)
      

  4.   

    wylwyl1130(落雪山林) 
    ORA-02287 sequence number not allowed hereCause: The specified sequence number reference, CURRVAL or NEXTVAL, is inappropriate at this point in the statement.Action: Check the syntax. Then remove or relocate the sequence number.
    是什么意思。不是太懂
      

  5.   

    原来是我用了group by 和order by
    但是我不用不行啊
    我是在作统计用到sum()、count()
    怎么办各位高手?
    谢谢!!!
      

  6.   

    把group by的语句放到子查询中或键个临时表
    insert into
    tablea (field1,field2...)
    select
    seq_manager.nextval,
    t.name,
    t.text
    from
    (select
    sum(column1),
    count(column1),
    name,
    text
    from
    tableb
    group by ..
    order by..) t