2012-06-01 90 views
0

我有一個我的csv文件來顯示它的格式。我只是想在我進一步確定之前確信我的數據將正確上傳到我的Oracle數據庫中。我目前正在使用sqlloader來做到這一點。寫入控制將csv文件插入Oracle數據庫的文件

"SERV TAP ID", "ACCT NUMBER", "MTR ID" , "SERV HOUSE","SERV STREET", "SERV TOWN", "BIL NAME","MTR DATE SET3","BIL PHONE","MTR SIZE","BILL CYCLE","MTR REMOTE ID" 

"111111" , "222222222" , "33333333", "444", "Mark AVE", "Monroe", "Dos Equis", "07092008", "" , "0058" , "21", "1480040662" 

這就是我的控制文件的樣子。關於我在做什麼錯誤的任何想法?

load data 
infile GIS.csv 
into table Billing 
fields terminated by "," 
(TAP_ID, ACCT_NUM, MTR_ID, SERV_HOUSE, SERV_STREET, SERV_TOWN, BIL_NAME, MTR_DATE_SET, BIL_PHONE, MTR_SIZE, BILL_CYCLE, MTR_RMT_ID) 

回答

0

看起來對我而言。我建議增加:

OPTIONALLY ENCLOSED BY '"' 

跳過周圍的值引號和

OPTIONS(SKIP=1) 

跳過標題行。