ITPub博客

首页 > Linux操作系统 > Linux操作系统 > sqlldr Field in data file exceeds maximum length

sqlldr Field in data file exceeds maximum length

Linux操作系统 作者:lovestanford 时间:2016-04-23 11:26:26 0 删除 编辑

sqlldr 导入时报如下错误:

Record 1: Rejected - Error on table INFOBASE, column CONTENT.
Field in data file exceeds maximum length
Record 2: Rejected - Error on table INFOBASE, column CONTENT.
Field in data file exceeds maximum length

我的控制文件为

OPTIONS ( DIRECT=TRUE)
LOAD DATA
INFILE '/u/oracle/cdrd/sms_data/hebei_yd/hb_yd_sms_content.txt'
BADFILE '/u/oracle/sqlldr/log/hebei_yd/hb_yd_sms_content.bad'
DISCARDFILE '/u/oracle/sqlldr/log/hebei_yd/hb_yd_sms_content.dsc'
INTO TABLE "ETL"."HB_YD_SMS_CONTENT"
TRUNCATE
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(sms_id,
category_id,
areas_id,
sms_type,
content )

表定义为:

CONTENT字段为varchar2(4000 char)

解决:

控制文件修改为:

OPTIONS ( DIRECT=TRUE)
LOAD DATA
INFILE '/u/oracle/cdrd/sms_data/hebei_yd/hb_yd_sms_content.txt'
BADFILE '/u/oracle/sqlldr/log/hebei_yd/hb_yd_sms_content.bad'
DISCARDFILE '/u/oracle/sqlldr/log/hebei_yd/hb_yd_sms_content.dsc'
INTO TABLE "ETL"."HB_YD_SMS_CONTENT"
TRUNCATE
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(sms_id,
category_id,
areas_id,
sms_type,
content char(20000)
)

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

请登录后发表评论 登录
全部评论

注册时间:2012-09-27

  • 博文量
    213
  • 访问量
    974484