数据在SQLLDR的时候提示错误, 使用TRAILING NULLCOLS
2014-06-27 16:08
369 查看
数据在SQLLDR的时候提示错误
在逻辑记录结束之前未找到列
1.sale.log文件
SQL*Loader: Release 10.2.0.4.0 - Production on Fri Jun 27 16:02:28 2014
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Control File: sale.ctl
Data File: sale418.csv
Bad File: sale418.bad
Discard File: none specified
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table TMP3, loaded from every logical record.
Insert option in effect for this table: INSERT
Column Name Position Len Term Encl Datatype
------------------------------ ---------- ----- ---- ---- ---------------------
USERNAME FIRST * , CHARACTER
PHONE1 NEXT * , CHARACTER
PHONE2 NEXT * , CHARACTER
PHONE3 NEXT * , CHARACTER
EMAIL1 NEXT * , CHARACTER
EMAIL2 NEXT * , CHARACTER
Record 1: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 3: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 6: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 7: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 8: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 10: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 11: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 12: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 14: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 16: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 18: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 19: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 20: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 21: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 22: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 25: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 30: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 33: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 34: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 35: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 36: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 39: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 40: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 44: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 51: Rejected - Error on table TMP3, column EMAIL2.
MAXIMUM ERROR COUNT EXCEEDED - Above statistics reflect partial run.
Table TMP3:
70 Rows successfully loaded.
51 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 99072 bytes(64 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 121
Total logical records rejected: 51
Total logical records discarded: 0
Run began on Fri Jun 27 16:02:28 2014
Run ended on Fri Jun 27 16:02:31 2014
Elapsed time was: 00:00:02.99
CPU time was: 00:00:00.01
1.查看bad文件,找到错误数据是否与 要导入的excel或者txt文件的列数、要导入的目标表的列数一致
2.如果列一致,查看最后一列是否为空,如果最后一列为空,sqlldr运行时会报错
加上trailing nullcols (表的字段没有对应的值时允许为空 ),
将所有不在纪录中的指定位置的列当作空值,指记录中没有内容(空格、空白、或null)的列被当作null
load data
infile 'sale418.csv'
into table tmp3
fields terminated by ','
trailing nullcols -----将所有不在纪录中的指定位置的列当作空值
(username,phone1,phone2,phone3,email1,email2)
在逻辑记录结束之前未找到列
1.sale.log文件
SQL*Loader: Release 10.2.0.4.0 - Production on Fri Jun 27 16:02:28 2014
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Control File: sale.ctl
Data File: sale418.csv
Bad File: sale418.bad
Discard File: none specified
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table TMP3, loaded from every logical record.
Insert option in effect for this table: INSERT
Column Name Position Len Term Encl Datatype
------------------------------ ---------- ----- ---- ---- ---------------------
USERNAME FIRST * , CHARACTER
PHONE1 NEXT * , CHARACTER
PHONE2 NEXT * , CHARACTER
PHONE3 NEXT * , CHARACTER
EMAIL1 NEXT * , CHARACTER
EMAIL2 NEXT * , CHARACTER
Record 1: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 3: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 6: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 7: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 8: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 10: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 11: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 12: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 14: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 16: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 18: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 19: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 20: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 21: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 22: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 25: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 30: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 33: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 34: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 35: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 36: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 39: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 40: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 44: Rejected - Error on table TMP3, column EMAIL2.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 51: Rejected - Error on table TMP3, column EMAIL2.
MAXIMUM ERROR COUNT EXCEEDED - Above statistics reflect partial run.
Table TMP3:
70 Rows successfully loaded.
51 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 99072 bytes(64 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 121
Total logical records rejected: 51
Total logical records discarded: 0
Run began on Fri Jun 27 16:02:28 2014
Run ended on Fri Jun 27 16:02:31 2014
Elapsed time was: 00:00:02.99
CPU time was: 00:00:00.01
1.查看bad文件,找到错误数据是否与 要导入的excel或者txt文件的列数、要导入的目标表的列数一致
2.如果列一致,查看最后一列是否为空,如果最后一列为空,sqlldr运行时会报错
加上trailing nullcols (表的字段没有对应的值时允许为空 ),
将所有不在纪录中的指定位置的列当作空值,指记录中没有内容(空格、空白、或null)的列被当作null
load data
infile 'sale418.csv'
into table tmp3
fields terminated by ','
trailing nullcols -----将所有不在纪录中的指定位置的列当作空值
(username,phone1,phone2,phone3,email1,email2)
相关文章推荐
- 数据在SQLLDR的时候提示错误, 使用TRAILING NULLCOLS
- 数据在SQLLDR的时候提示错误,在逻辑记录结束之前未找到列(使用 TRAILING NULLCOLS)
- 数据在SQLLDR的时候提示错误,在逻辑记录结束之前未找到列(使用 TRAILING NULLCOLS)
- 使用纯XAML标记实现数据验证错误提示
- 使用sql server management studio 2008 连接数据库,无法查看数据库,提示 无法为该请求检索数据 错误916
- 使用ODP.NET查询数据参数顺序问题及莫名ORA-01722错误提示
- 使用CURL上传文件和数据时提示Array to string conversion错误,解决方法!
- linux 在使用ssh实现内网互联互通时候提示connected by ip 错误的解决方法
- 在flex中使用RemoteObject保存数据提示Type Error#1009 错误解决
- 使用sql server management studio 2008 无法查看数据库,提示 无法为该请求检索数据 错误916解决方法
- oracle中使用impdp数据泵导入数据提示“ORA-31684:对象类型已经存在”错误的解决
- 使用httpClient的post发送数据时候错误:cannot inherit from final class
- VS2005 SP1 安装时候,提示“无法使用此产品的安装源,请确认安装源存在,并且您可以访问它”的错误
- jenkins 使用 maven的pom.xml编译的时候提示 错误: 编码GBK的不可映射字符
- 使用maven编译的时候提示 maven-source 1.3 中不支持注释请使用 -source 5 或更高版本以启用注释的错误。
- 在使用JSTL的时候不要把jsp文件命名为jstl.jsp,会提示错误
- 使用UNION提示错误“不能以 DISTINCT 方式选择 text、ntext 或 image 数据类型。”
- 在使用ajax接收返回map的时候,提示406错误
- 备份数据到 NFS 磁盘的时候提示ORA-27054错误
- 小猫统计form方式编辑数据使用下拉框出现错误提示