Home » RDBMS Server » Server Utilities » problem different date format loading using sqlldr
problem different date format loading using sqlldr [message #357722] Thu, 06 November 2008 06:28 Go to next message
Messages: 118
Registered: December 2007
Location: Chicago
Senior Member

Oracle and windows professional 2002


I am trying to load the data containing a different formats of dates in the same field. The dates are in different format, in the that date field. Here is some sample data from there below.. I need to load all these dates, which is in different format in one column of the csv file to one of the date field of the database table. I have tried several ways, but no luck so far.. any small hint would be apprecciated..

2008-07-22 00:00:00.000

[Updated on: Thu, 06 November 2008 06:44]

Report message to a moderator

Re: problem different date format loading using sqlldr [message #357780 is a reply to message #357722] Thu, 06 November 2008 09:33 Go to previous message
Barbara Boehmer
Messages: 8609
Registered: November 2002
Location: California, USA
Senior Member
You can create a user-defined function to accept the string as a varchar2, check the format, and use to_date to return the date based on that format, then use the function in your SQL*Loader control file. However, how will you know if something like 1/5/2004 is January 5th of 2004 or May 1st of 2004?
Previous Topic: SQL Loader, CTL file: How to DEFAULT a value ?
Next Topic: import data of one table from dump and import single table based on condition (2 threads merged by b
Goto Forum:

Current Time: Sun Oct 23 07:43:59 CDT 2016

Total time taken to generate the page: 0.07585 seconds