load data
infile *
into table consign_org
fields terminated by ',' optionally enclosed by '"'
(id,org_code,org_name,root_flag,parent_code,spell_short,active_flag,delete_flag,remark,create_user,create_datetime date 'yyyy-mm-dd hh24:mi:ss',update_user,update_datetime date 'yyyy-mm-dd hh24:mi:ss')
begindata
"1","230400260000","單位1""特殊行動""名稱","0","230400000000","","1","0","","admin","2015-11-06 15:14:43","",""
"2","232700010100","單位2""特殊行動""名稱","0","232700010000","","1","0","","admin","2015-11-06 15:14:43","",""
"3","441302210000","單位3""特殊行動""名稱","0","441302000000","","1","0","","admin","2015-11-06 15:14:43","",""
"4","441302210100","單位4""特殊行動""名稱","0","441302210000","","1","0","","admin","2015-11-06 15:14:43","",""
"5","441302210200","單位5""特殊行動""名稱","0","441302210000","","1","0","","admin","2015-11-06 15:14:43","",""
"6","441302210300","單位6""特殊行動""名稱","0","441302210000","","1","0","","admin","2015-11-06 15:14:43","",""
"7","441302210400","單位7""特殊行動""名稱","0","441302210000","","1","0","","admin","2015-11-06 15:14:43","",""
8","441302210500","單位8""特殊行動""名稱","0","441302210000","","1","0","","admin","2015-11-06 15:14:43","",""
需要注意的是,如果載入的資料某列中含有包圍字元,需要使得包圍字元出現兩次,做下轉義!
sqlldr載入txt資料
首先建立乙個控制檔案load.ctl,名稱可以隨便起,必須以.ctl為檔案型別 內容 解釋 其中分隔符要根據資料檔案的實際分隔符一直,目標表的欄位名不一定是全量的,但是一定要與資料檔案的字段保持一直,並且資料檔案的首行的如果有列名要刪掉 下面就是載入命令 sqlldr userid cms c j ...
Oracle中使用sqlldr載入資料
示例1.建立示例資料表 create table ts user id varchar2 20 user name varchar2 30 password varchar2 50 char 1 create time date 2.在e盤下建立控制檔案data.ctl,內容如下 load data...
Oracle中使用sqlldr載入資料
一 sqlldr資料載入簡單示例 1.建立示例資料表 create table ts user id varchar2 20 user name varchar2 30 password varchar2 50 char 1 create time date 2.在e盤下建立控制檔案data.ctl...