我的文本以逗号分隔文件格式如下。
"RAZY","","","","","","","","N","Y","27-JUL-14","1","98727076437","27-JUL-14"
"TEST","","","","","","","","N","Y","27-JUN-14","1","98727076437","27-JUN-79"
OPTIONS (SKIP=0)
LOAD DATA
INFILE '/home/test.txt'
BADFILE '/home/test.bad'
DISCARDFILE '/home/test.dis'
APPEND
INTO TABLE "TEST"
fields terminated by ","
optionally enclosed by '"'
TRAILING NULLCOLS
(
NAME ,
TITLE ,
INITIAL ,
SURNAME ,
STREET ,
TOWN ,
COUNTY ,
POSTCODE ,
TELEPHONE ,
FLAG ,
Update_DATE DATE "TO_DATE(:Update_DATE,'DD-MON-RR')",
Update_STATUS ,
VISIT_REFERENCE ,
LOADED_DATE DATE "TO_DATE(:LOADED_DATE,'DD-MON-RR')"
)
但是返回了错误" ORA-01821:日期格式无法识别"
由于
答案 0 :(得分:1)
试试这个。
Update_DATE DATE "DD-MON-RR",
LOADED_DATE DATE "DD-MON-RR"