CTL文件:load data infile 'D:\temp\1.txt'
append
into table tmp_info
fields terminated by ''
(
id constant 0,
PHONENUMBER,
RECVTIME sysdate,
dealtime constant "to_date('20080912083000', 'yyyymmddhh24miss')",
operstatus constant 0,
level constant 8
)
在导入第一行出错:
记录 1: 被拒绝 - 表 TMP_INFO 的列 DEALTIME 出现错误。
ORA-01858: 在要求输入数字处找到非数字字符
append
into table tmp_info
fields terminated by ''
(
id constant 0,
PHONENUMBER,
RECVTIME sysdate,
dealtime constant "to_date('20080912083000', 'yyyymmddhh24miss')",
operstatus constant 0,
level constant 8
)
在导入第一行出错:
记录 1: 被拒绝 - 表 TMP_INFO 的列 DEALTIME 出现错误。
ORA-01858: 在要求输入数字处找到非数字字符
append
into table tmp_info
fields terminated by ''
(
id constant 0,
PHONENUMBER,
RECVTIME sysdate,
dealtime constant 20080912083000,
operstatus constant 0,
level constant 8
)
OPER@tl>create table test(aaa number,bbb date,ccc number);表已创建。ctl文件:
load data
infile 'c:\date.txt'
append
into table test
fields terminated by ','
(aaa,
bbb constant 20080808080000,
ccc)
--------------------------------------
DATe.txt:
1,20010111011000,11
--------------------------------------
C:\Documents and Settings\jk>sqlldr oper/111 control=c:\c.txtSQL*Loader: Release 10.2.0.3.0 - Production on 星期五 9月 12 10:18:59 2008Copyright (c) 1982, 2005, Oracle. All rights reserved.达到提交点 - 逻辑记录计数 1
----------------------------------------------------------
OPER@tl>select * from test; AAA BBB CCC
---------- ------------------- ----------
1 2008-08-08 08:00:00 2.0010E+13修改CTL:
load data
infile 'c:\date.txt'
append
into table test
fields terminated by ','
(aaa,
x filler,
bbb constant 20080808080000,
ccc)
---------------------------------
OPER@tl>/ AAA BBB CCC
---------- ------------------- ----------
1 2008-08-08 08:00:00 2.0010E+13
1 2008-08-08 08:00:00 11
CTL其它不变,dealtime改为:dealtime constant 20080912083000,记录 1: 被拒绝 - 表 TMP_INFO 的列 DEALTIME 出现错误。
ORA-01861: 文字与格式字符串不匹配顺便说一句,我是oracle 8.1.6
VC555是oracle10啊, -_-!!