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
shoaib123
Messages: 118
Registered: December 2007
Location: Chicago
Senior Member
Oracle 9.2.0.2 and windows professional 2002

HI

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..

12/31/2003
1/5/2004
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: 9091
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: Wed May 01 06:01:38 CDT 2024