I have table A that I need to insert its data into table B.
The way I'm doing it is with direct path insert
for performance issue:
INSERT /*+ append */ INTO
usr.B (c,d,e)
select c,d,e from usr.A;
Now I want to add an errors handling on row-level.
I mean that if there is an exception with some rows (because of constraints), the next rows will continue to insert into A, and the specific problematic rows will be saved in log table.
So I checked the option of DML error logging for that goal, but I found that it can't work with unique duplicates constraints in direct path statements, which is a very basic and important constraints in my tables.
I saw that solution that suggest to add fictive failure if there is duplicates, but it can't be good for me because of some reasons:
I have a lot of tables (1000) which need to go over that process, so add that column for each table is impposible.
The solution will help if there are duplicates in the source table already, but in my case can be one row in each table, so the duplicate check of the source data is not good enough.
Is there any idea how to do it right?
I know there is an option of SAVE EXCEPTIONS
with FORALL
but I realy prefer to use INSERT SELECT
for all the rows with no loop.
Thanks.