How retrieve ids inserted into a table with a sequence?
Posted: Tue May 29, 2007 3:14 am
Hi,
I must insert few rows into an oracle table. But in this table, there is a trigger which generate the id with a sequence:
" IF :new.c_thrd_in_no IS NULL THEN
SELECT THRD_c_thrd_in_no.nextval
INTO :new.c_thrd_in_no
FROM dual;
END IF;"
And i would like to retrieve the new ids which correspond to the rows inserted and put these ids into a dynamic relashionship file.
I succeed to retrieve into a file the new id to insert, but i don't know how to merge this file with my other file which contain the others data to insert. (the 2 files don't have the same number of columns).
if anybody have an idea...
thanks
I must insert few rows into an oracle table. But in this table, there is a trigger which generate the id with a sequence:
" IF :new.c_thrd_in_no IS NULL THEN
SELECT THRD_c_thrd_in_no.nextval
INTO :new.c_thrd_in_no
FROM dual;
END IF;"
And i would like to retrieve the new ids which correspond to the rows inserted and put these ids into a dynamic relashionship file.
I succeed to retrieve into a file the new id to insert, but i don't know how to merge this file with my other file which contain the others data to insert. (the 2 files don't have the same number of columns).
if anybody have an idea...
thanks