1.表结构如下:
create table test(
empid number,
name varchar2(4000),
birthday date
)
2.excel文件中birthday列是日期型且为:为空.
3.当用sqlldr username/password@servicename control=insert.ctl时,报错:
"记录 1: 被拒绝 - 表 test的列 birthday出现错误。
在逻辑记录结束之前未找到列(使用 TRAILING NULLCOLS)." ????????怎么办
急求!!!!!!!!
附:我已在excel中把birthday列设置为日期型还是报同样的错误.各位高手帮帮我.
create table test(
empid number,
name varchar2(4000),
birthday date
)
2.excel文件中birthday列是日期型且为:为空.
3.当用sqlldr username/password@servicename control=insert.ctl时,报错:
"记录 1: 被拒绝 - 表 test的列 birthday出现错误。
在逻辑记录结束之前未找到列(使用 TRAILING NULLCOLS)." ????????怎么办
急求!!!!!!!!
附:我已在excel中把birthday列设置为日期型还是报同样的错误.各位高手帮帮我.
再者我要用程序实现,也就是只能用oracle自带的实用工具,而不能借用其他第三方工具.要实现让一般的人选个文件点个按钮即可完成上述导入的操作.
可否在sqlldr的控制文件入手??或是其他方面..
譬如:我先前的.ctl文件:
load data
infile 'c:\test.csv'
append into table test
fields terminated by ','
(empid,name,birthday)
后来经freddy2003的指点改.ctl文件如下:
load data
infile 'c:\test.csv'
append into table test
fields terminated by ','
(empid,name,birthday date "yyyy-mm-dd")
帮我解决了文本与格式的错误.
infile 'c:\test.csv'
append into table test
fields terminated by ','
TRAILING NULLCOLS
(empid,name,birthday date "yyyy-mm-dd")
不能解决日期为空的问题.
当excel文件中日期列有空值时就不能导入到oracle中,这不是我所希望的,我所要的是不管日期列是否有值都应该导入.
你把你的问题说得细点。我不太明白你要问的具体问题。