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
Insert Multiple rows into a oracle table
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 15
- Joined: Thu Aug 07, 2008 2:56 am
Re: Insert Multiple rows into a oracle table
The stage in sequential mode will wait till all records are processed and avaliable, then stage will process them and avaliable for next link. So you are using the copy stage with sequential mode. So it is using same ES_ID I guess. Use this as a tip.
Karthik
Make It Work Make It Right Make It Fast
Make It Work Make It Right Make It Fast
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: