Oracle sqlldr 时间戳格式头疼

2022-01-13 00:00:00 format timestamp oracle sql-loader

我正在努力让 sqlldr 将 csv 数据文件导入到我的表中,特别是使用时间戳字段.

I'm struggling to get sqlldr to import a csv data file into my table, specifically with the field that is a timestamp.

我的 csv 文件中的数据是这种格式:

The data in my csv file is in this format:

16-NOV-09 01.57.48.001000 PM

我已经在我的控制文件中尝试了各种组合方式,并且正在转圈.我在网上找不到任何东西——甚至没有详细说明所有日期/时间戳格式字符串是什么的 Oracle 参考页面.

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", 
...)

推荐答案

你可以试试这个格式:

event_timestamp TIMESTAMP "dd-MON-yy hh.mi.ss.ff6 PM"

您可以在 SQL 参考文档.

相关文章