oracle sqlldr 数据导入错误Field in data file exceeds maximum length解决

使用oracle sqlldr进行数据导入时报Field in data file exceeds maximum length错误的解决办法:
一种是数据字段确实比数据库中的字段要长,这中错误需要调整数据库字段的长度,一种是减小字段的长度。

第二种是因为要入库的字段问题(中文问题),这种问题在control文件中添加字符类型表示进行解决。如:
load data
append into table boss_workform_jt
fields terminated by "|"
TRAILING NULLCOLS
(WORKFORM_ID, ACCEPT_TIME date 'yyyymmddhh24miss', COMPLAINT_CONTENT char(4000),CUSTOMER_satisfaction_code,is_workform,DUTYCAUSE_level,
 ,ARCHIVETIME date 'yyyymmddhh24miss',handle_advice char(1000),backfeed_advice char(500),enterpriseName,terminal_code,
terminal_manufacturer,terminal_model,terminal_standard,terminal_type)

红色部分就是在入库时报Field in data file exceeds maximum lengt错误的部分,根据字段实际长度添加char(n),如字段COMPLAINT_CONTENT、handle_advice、backfeed_advice(是char而不是varchar2),n根据实际长度进行指定,可以正常入库。

猜你喜欢

转载自flyeagle.iteye.com/blog/1774205