sql loader - how to ignore inserting duplicate records
Hi,
Im calling sql loader recursively to load data from CSV files which has thousands of records in each file. If there are any duplicate records, the sql loader terminates with ORA00001. My query is how to ignore inserting duplicate records and continue with the load.
Most of the posts in forums suggests to use skip command. But i do not think that is a wise option in my case as we cannot predict the maximum error count. more over I have set up ERROR=0 in my code so that the code terminates in case thers is a data error.
Please let me if there is are any other way to ignore inserting duplicate records into the tables.
My query is how to ignore inserting duplicate records and continue with the load.
Most of the posts in forums suggests to use skip command. But i do not think that is a wise option in my case as we cannot predict the maximum error count.
That's the conundrum... you cannot have it both ways.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Like you said, there is no way to predict the maximum number of errors. Read the documentation and use the bad and discard files. Your overall choices are:
1. Fix the data ahead of time
2. Load all the data and de-dupe the table
3. Pick a large enough value for errors
Bookmarks