Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle sqlldr timestamp format headache

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", 
...)
like image 769
Kevin Avatar asked Dec 30 '09 15:12

Kevin


1 Answers

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.

like image 75
Vincent Malgrat Avatar answered Nov 16 '22 00:11

Vincent Malgrat