Insert Multiple rows into a oracle table
Posted: Tue Nov 22, 2011 5:23 pm
Hi All,
I am inserting the data into oracle table by using the odbc stage.
Say employee_name table,
There is after insert trigger on the employee_name table for inserting the data into the employee_sports table
ES_ID, Employee_name, Sports
ES_ID is primary key
This trigger works like below
For every new employee it inserts two records into the employee_sports like if we get 'A' then this table will have
1 A Soccer
2 A Baseball
New ES_ID is populated by fetching the maximum value of its ES_ID +1 and inserts a new record into table.
So i kept the options as below in the ODBC stage.
Isolation level=ReadCommitted
Record count=1
Array_Size=1
Auto Commit Mode on.
I ran job in parallel and kept a copy stage execution mode as 'SEQUENTIAL', before the odbc stage.
The job aborts and say that
I am getting a unique key violated constraint on the employee_sports.
Is there a problem with the job ?
Is there a problem for fetching the maximum value in the employee_sports?
Thanks in advance
I am inserting the data into oracle table by using the odbc stage.
Say employee_name table,
There is after insert trigger on the employee_name table for inserting the data into the employee_sports table
ES_ID, Employee_name, Sports
ES_ID is primary key
This trigger works like below
For every new employee it inserts two records into the employee_sports like if we get 'A' then this table will have
1 A Soccer
2 A Baseball
New ES_ID is populated by fetching the maximum value of its ES_ID +1 and inserts a new record into table.
So i kept the options as below in the ODBC stage.
Isolation level=ReadCommitted
Record count=1
Array_Size=1
Auto Commit Mode on.
I ran job in parallel and kept a copy stage execution mode as 'SEQUENTIAL', before the odbc stage.
The job aborts and say that
I am getting a unique key violated constraint on the employee_sports.
Is there a problem with the job ?
Is there a problem for fetching the maximum value in the employee_sports?
Thanks in advance