sqloraclesql-loader

How to define errors inside a sqlloader ctl file


with the aim of importing data automatically into an Oracle database, I created a CTL file using the SQL*Loader. I would like to add some clause to this file that allows me to block the file upload and to stop it when it finds an error. How can I do? What should I put inside the CTL file?


Solution

  • You can add errors=0 to the sqlldr command line arguments, which is the way it's normally done. Or you can also place this line inside the control file just before "LOAD DATA":

    OPTIONS (ERRORS=0)