您好,我正在尝试将文件中的数据加载到 Oracle 中的表中,但我收到错误 ORA-01843:插入日期时不是有效月份。
文件中的日期为 27-01-2014
我的表格中的格式设置为 DATE。
这是控制文件。
load data
infile 'file1.csv'
append
into table my_table
fields terminated by ',' TRAILING NULLCOLS
(Case_reference, Attempt_Number, Dialled_Number, Date_Called)
有人知道我哪里出错了吗?
干杯
最佳答案
Oracle 可能将 27 作为一个月并抛出这样的错误
尽量在控制文件中给出格式
load data
infile 'file1.csv'
append
into table my_table
fields terminated by ',' TRAILING NULLCOLS
(Business_function,
Case_reference,
Sub_sequence,
Dialler_Master_Stream ,
Dialler_Call_Stream,
Dialler_Super_Stream,
Attempt_Number,
Dialled_Number,
Date_Called DATE "DD-MM-YYYY")
关于SQL Loader 日期格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21425825/