Oracle sqlldr时间戳格式头痛 [英] Oracle sqlldr timestamp format headache
问题描述
我的csv文件中的数据是这样的格式:
16-NOV-09 01.57.48.001000 PM
我已经在我的控制文件中试过了所有的组合方式,我在网上找不到任何东西 - 甚至连Oracle参考页面都没有详细说明所有的日期/时间戳格式字符串。
有没有人知道这个参考页面的位置,或者是什么格式字符串,我应该在我的控制文件中使用这个时间戳格式。
作为参考,这是我最近尝试的:
加载数据
infile 'kev.csv'
into table page_hits
字段以〜结尾
(...
event_timestamp TIMESTAMPdd-mmm -yy hh24.mi.ss,
...)
格式:
event_timestamp TIMESTAMPdd-MON-yy hh.mi.ss.ff6 PM
您可以浏览 SQL参考文档。
I'm struggling to get sqlldr
to import a csv data file into my table, specifically with the field that is a timestamp.
The data in my csv file is in this format:
16-NOV-09 01.57.48.001000 PM
I've tried all manner of combinations in my control file and am going around in circles. I can't find anything online - not even the Oracle reference page that details what all the date/timestamp format strings are.
Does anyone know where this reference page is, or what format string I should be using in my control file for this timestamp format.
For reference, this is what I've most recently tried:
load data
infile 'kev.csv'
into table page_hits
fields terminated by "~"
( ...
event_timestamp TIMESTAMP "dd-mmm-yy hh24.mi.ss",
...)
you can try this format:
event_timestamp TIMESTAMP "dd-MON-yy hh.mi.ss.ff6 PM"
You can browse all available formats in the SQL reference documentation.
这篇关于Oracle sqlldr时间戳格式头痛的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!