During the last week, while loading the data into the table from csv file, some of the records are getting failed with the following error:
Record 25: Rejected – Error on table “SCOTT”.”EMPLOYEE”, column DESCRIPTION.
Field in data file exceeds maximum length
While verifying the control file of the sql loader, i got to know that its default behavior of the sql loader.
By default, when you mention “columnname char” without the size in the control file, sql loader will load maximum of 255 characters long to that particular column, even your column size is more than 255 characters in the table. In this situation, if we want to load the column data more than 255 characters data, explicitly we need to mention the size in the control file within the datatype.
Earlier in my SQL Loader control file, description column mentioned as follows:
After the error, it is modified as:
it will allow description field upto 500 characters long.
In this way, if you want to load more than 255 characters, just explicitly mention the size in the data type field of the SQL Loader control file.