Good morning, guys!
I'm trying to do a select insert in Oracle using a SEQUENCE in the id, but it's giving error on account of a group by in select.
Dry my SQL:
INSERT INTO SUP_T(ID, DESCRICAO)
SELECT SEQ_SUP_T.NEXTVAL,TIPO.TIPO
FROM TB_TIPO_APLICACAO TIPO
GROUP BY TIPO.TIPO;
The error that appears is as follows:
Relatório de erros -
Erro de SQL: ORA-02287: número de seqüência não permitido aqui
02287. 00000 - "sequence number not allowed here"
*Cause: The specified sequence number (CURRVAL or NEXTVAL) is inappropriate
here in the statement.
*Action: Remove the sequence number.
Has anyone ever been through this?