Monday, April 28, 2014

SQL failed when field exceed 255 character.

Problem description:

SQL load failed with following error:
Field in data file exceeds maximum length


Cause:
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.

Solution:

In the sqlldr control file, change column:
description
to:
description char(500)