二、制定控制檔案result.ctl
result.ctl内容:
load data
infile 'result.csv'
into table resultxt
(resultid char terminated by ',',
website char terminated by ',',
ipport char terminated by ',',
status char terminated by whitespace)
說明:
infile 指資料源檔案 這裡我們省略了預設的 discardfile result.dsc badfile result.bad
into table resultxt 預設是INSERT,也可以into table resultxt APPEND為追加方式,或REPLACE
terminated by ',' 指用逗号分隔
terminated by whitespace 結尾以空白分隔
三、此時我們執行加載:
D:\>sqlldr userid=fancy/testpass control=result.ctl log=resulthis.out