archan_dhar
asked on
SQL*Loader
I have certain constraints on the DB. When I load a file using SQL*Loader, however, the constraints are violated. Why does this happen? Is there any way to ignore the violating records, and complete loading?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Split between Danielzt and ubashe.
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Henka
EE Cleanup Volunteer
I will leave a recommendation in the Cleanup topic area that this question is:
Split between Danielzt and ubashe.
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Henka
EE Cleanup Volunteer
ASKER
Regarding case 2, I just want to discard the cases that violates the unique key constraint on one column. No specific number of discards can be pin pointed.
To be very clear with my requirement, let me give an example. Following is the data file:
AA,PPPPP,1
BB,QQQQ,2
BB,FFFFF,3
CC,GGGG,4
CC,KKKK,5
DD,LLLL,6
The column in the table that is assigned for the first column in the data file is the primary key.
My problem is when I upload the above file into DB using SQL*Loader, all the columns get loaded. This violates the unique key constraint on the primary key. I just want the following rows to be loaded:
AA,PPPPP,1
BB,QQQQ,2
CC,GGGG,4
DD,LLLL,6