问题描述
我正在尝试从.csv
文件导入一些数据(使用oracle sql developer),但出现错误:-
I'm trying to import some data (using oracle sql developer) from a .csv
file but I'm getting an error as :-
Verifying if the Date columns have date formats FAILED Date columns
...列名
我的.csv
文件中的日期是:
2008-01-09 15:59:23.187
我尝试提供这种格式,但不起作用(在数据导入向导中)
I have tried giving this format but it doesn't work (in the data importing wizard)
yyyy-mm-dd HH24:mi:ss.ff3
我正在尝试找到一个需要帮助的解决方案.
I'm trying to figure out a solution expecting some help.
谢谢.
推荐答案
我目前无法测试,但我正在猜测:该格式不是DATE格式,而是TIMESTAMP格式.考虑:
I can't test right now but I'm taking a guess: the format is not a DATE format but a TIMESTAMP format. Consider:
SQL> select to_date('2008-01-09 15:59:23.187',
2 'yyyy-mm-dd HH24:mi:ss.ff3') from dual;
ORA-01821: date format not recognized
SQL> select to_timestamp('2008-01-09 15:59:23.187',
2 'yyyy-mm-dd HH24:mi:ss.ff3') ts from dual;
TS
-------------------------------------------------
09/01/08 15:59:23,187000000
如果这是SQL Dev遇到的相同错误,则可以导入一个timestamp列.
If this is the same error that SQL Dev encounters, you could import in a timestamp column.
这篇关于从CSV文件导入数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!