I'm trying to execute the following statement:
INSERT INTO mySchema.ODI_PRICELIST_THREAD_TABLE
(
src_table,
thread_id,
creation_date
)
SELECT DISTINCT
source_table AS src_table,
num_thread_seq.nextval AS THREAD_ID,
create_date AS CREATION_DATE
FROM mySchema.nb_pricelist_ctrl
I need the THREAD_ID
field to be a number from 1 to X where X is defined in runtime therefore I've used a sequence from 1 to X (I'm using ODI).
However, I keep having the ORA-02287 Sequence not allowed error...
I've read this question and I still can't figure how I can fix my problem. I've been seaching but I'm having no luck with finding a solution. Please help