Wednesday, December 11, 2013

SQLLOADER - Error Field in data file exceeds maximum length

If you do not specify length of a character column in your control file it defaults to CHAR(255).  And because of this reason most of the times you will see above error.  Whenever there is a chance that your number of characters of your column are going to be more than 255 - specify the length explicitly.

Instead of 1 below use 2:
1. load data
   APPEND
   into table t
   fields terminated by '|'
   TRAILING nullcols
   (col1,
    col2,
    col3)

2.  load data
    APPEND
    into table t
    fields terminated by '|'
    TRAILING nullcols
    (col1 CHAR(4000),
    col2,
    col3)

No comments:

Post a Comment

Convert Java SQL String to Oracle SQL Format in TOAD

At times Toad might reset the capability to strip off / convert the the SQL in Java string format to SQL format. You can have that back...