sqlldr trailing nullcols

 由于要导入到tmp_content表的一些列(列:要导入的源文件txt or csv文件)为空,也,按理讲我当时另存为(在windows处理)csv,以,分隔。就是这个列没有内容,也该显示, ,之类的。

  后在控制文件修改如下:

-bash-3.1$ more import_tmp_content.ctl 
load data
infile '/oracle/wu_li.txt'
append into table  tmp_content
fields terminated by ','
trailing nullcols  ##如要导入源文件此列内容为空,在导入到数据库表中,此列内容就是null
(content_id recnum,
version,
teachstage,
grade,
subject,
xiu,
chapter,
part,
subpart
)
-bash-3.1$

再次导入

 sqlldr userid=pd/system control=/oracle/import_tmp_content.ctl  log=load_wuli.log errors=1000

原文地址:https://www.cnblogs.com/sdream/p/6374429.html