1. 数据长度固定文件
数据文件:
12,aaa,bbb
13,ccc,ddd
14,eee,fff
15,ggg,hhh
控制文件:
load datainfile 'd:\load_data.txt'
append
into table scott.dept(
deptno position(1:2) char,
dname position(4:6) char,
Loc position(8:10) char)
运行:sqlldr scott/tiger@demo control=d:\load_control.ctl data=d:\load_data.txt
2. 长度不固定数据
数据文件:
16,aaadsasd,bbbd
17,cccsdds,ddddfdfd
18,eeedfdfdfdfd,fffdfdf
19,gggsd,hhhdfdf
控制文件:
load data
infile 'd:\load_data.txt'
append
into table scott.dept(
deptno char terminated by ",",
dname char terminated by ",",
Loc char terminated by ",")
运行:sqlldr scott/tiger@demo control=d:\load_control.ctl data=d:\load_data.txt
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24751738/viewspace-707564/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24751738/viewspace-707564/