Home » RDBMS Server » Server Utilities » sqlldr with dates and times
sqlldr with dates and times [message #69928] Wed, 20 March 2002 06:22 Go to next message
Todd
Messages: 17
Registered: October 2000
Junior Member
I'm trying to load a date/time set with sqlldr and am having problems getting it to accept both the date and the time.

I've checked around but haven't been able to come up with anything that will work...hopefully someone on the board can help me out.

Here goes.

The file that I'm attempting to load looks like this

jep1~ejcon~17-Mar 02:00~17-Mar 02:57~0:57:0~
jep1~jdedg~17-Mar 02:57~17-Mar 03:21~0:24:0~

and the control file that I've come up with is:

load data
infile 'jepdata_0316.txt.sav'
into table eep_monitor
fields terminated by '~' Optionally enclosed by "'"
(TYPE, PROCESS, START_DATE date 'DD-MON HH:MI', END_DATE date 'DD-MON HH:MI')

This loads the information into the table like this

TYPE PROCESS START_DAT END_DATE ---------- -------------------- --------- --------- ------
jep1 ejcon 17-MAR-02 17-MAR-02
jep1 jdedg 17-MAR-02 17-MAR-02

It is knocking of the time stamp for the date string...if anyone can help me out, so that I can get the time stamp included into the table, I'd appreciate it a ton.

Thanks, Todd
sqlldr with dates and times [message #69963 is a reply to message #69928] Sun, 24 March 2002 07:08 Go to previous messageGo to next message
Thusitha
Messages: 2
Registered: March 2002
Junior Member
I am also trying to load date and time set with sqlldr to an Oracle database. I am having problems loading DATE field into Oracle.

The DATE field in the .dat file that I am trying to load to Oracle has the following format for the date:
MON DD YYYY HH:MI:SSSAM

Please note that I am trying to migrate table data from a Sybase database to Oracle8i database using sql loader.

The problem with the DATE field value in the .dat file is the last two characters (AM or PM). Can any one (may be Todd) help me out to get this resolved?
Re: sqlldr with dates and times [message #70352 is a reply to message #69928] Fri, 31 May 2002 09:10 Go to previous message
Nomair Ahmed
Messages: 1
Registered: May 2002
Junior Member
Had the same problem....What i did was to make a parser which effectively converted the date to a 'DD-MON-YYYY' format. This does reduce the precisness of the date field but in my application that was not so important.
Also if you are moving the data from Sybase then when u produce the dat file produce it such that the date format is 'DD-MON-YYYY'. sqlldr should have absolutely no trouble then.
Previous Topic: sql*loader
Next Topic: Export Multiple databases
Goto Forum:
  


Current Time: Thu Apr 25 17:26:12 CDT 2024