how cath data duplicate in Forall Insert exception dup_val_on_index [message #393447] |
Sun, 22 March 2009 22:12  |
Theracersman
Messages: 28 Registered: November 2007 Location: Indonesia
|
Junior Member |

|
|
hi everyone, i need help for finish my work in pl/sql.
i have array and i want to insert with forall,and than
how to catch a duplicate data when insert with forall.
Loop
v_attr(v_line_idx).field_1 := 'Test';
End loop;
Begin
forall ix in 1 .. v_line_idx
insert into table_one values v_attr(ix);
commit;
Exception
when dup_val_on_index then
insert into table error(field_err)
values (v_attr(v_line_idx).field_1);
End;
|
|
|
|
|
|