ITPub博客

首页 > Linux操作系统 > Linux操作系统 > sqlldr导入数据报错 Field in data file exceeds maximum length

sqlldr导入数据报错 Field in data file exceeds maximum length

原创 Linux操作系统 作者:tolywang 时间:2011-08-09 16:05:23 0 删除 编辑

value used for ROWS parameter changed from 64 to 19
Record 1: Rejected - Error on table DELLYSD.SHIPLABEL, column TNINTERNALID.
Field in data file exceeds maximum length
Record 2: Rejected - Error on table DELLYSD.SHIPLABEL, column TNINTERNALID.
Field in data file exceeds maximum length
Record 4: Rejected - Error on table DELLYSD.SHIPLABEL, column TNINTERNALID.
Field in data file exceeds maximum length
Record 5: Rejected - Error on table DELLYSD.SHIPLABEL, column TNINTERNALID.
Field in data file exceeds maximum length
Record 3: Rejected - Error on table DELLYSD.SHIPLABEL, column TNINTERNALID.
ORA-12899: value too large for column "DELLYSD"."SHIPLABEL"."TNINTERNALID" (actual: 965, maximum: 60)

Record 6: Rejected - Error on table DELLYSD.SHIPLABEL, column MESGID.
ORA-01400: cannot insert NULL into ("DELLYSD"."SHIPLABEL"."MESGID")

 

 

 

 

Symptoms Loading long columns using sqlldr,the following error is reported:

" Record 1: Rejected - Error on table CRM_ATIC_HEADER_DIF, column LONG_DESC.
Field in data file exceeds maximum length "
Cause In the control file,char(n) had to be specified for all the "varchar2" and "long" columns that were there in the table definition
.
E.g. Control file:
LOAD DATA
INFILE data.dat
APPEND INTO TABLE sload
FIELDS TERMINATED BY ","
TRAILING NULLCOLS
(
PROCESS_DT,
PROCESS_ID,
PROCESS_FLG,
TICKET_ID ,
TICKET_TYPE ,
TECHNOLOGY ,
SUBFLAVOR ,
LIB_VER_NUM ,
PRIORITY ,
STATE ,
OPEN_DATE DATE 'DD-MON-YY',
REV_RELEASE ,
SHORT_DESC ,
LONG_DESC
)

Note that LONG_DESC is a long type described in the table definition of sload.
There are many other columns that are described as varchar2 in the table definition.

But in the control file char(n) where n is an integer is not specified. Fix 1.Check if there are any LONG or VARCHAR2 columns in the table where the data has to be loaded

2.Check the control file to make sure whether char(n) has been included for those corresponding columns.

Taking the example of the above control file,if these changes are made:
3.Changing the control file by including char(n) will resolve the issue

LOAD DATA
INFILE data.dat
APPEND INTO TABLE sload
FIELDS TERMINATED BY ","
TRAILING NULLCOLS
(
PROCESS_DT,
PROCESS_ID,
PROCESS_FLG,
TICKET_ID char(50),
TICKET_TYPE char(50),
TECHNOLOGY char(50),
SUBFLAVOR char(50),
LIB_VER_NUM char(50),
PRIORITY char(50),
STATE char(50),
OPEN_DATE DATE 'DD-MON-YY',
REV_RELEASE char(50),
SHORT_DESC char(50),
LONG_DESC char(1000)
)

 

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/35489/viewspace-704500/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
Oracle , MySQL, SAP IQ, SAP HANA, PostgreSQL, Tableau 技术讨论,希望在这里一起分享知识,讨论技术,畅谈人生 。

注册时间:2007-12-10

  • 博文量
    5595
  • 访问量
    13505227