Home » RDBMS Server » Server Utilities » SQLLDR date/time format with time like 0400AM
SQLLDR date/time format with time like 0400AM [message #70349] Fri, 31 May 2002 06:50 Go to next message
Artis Palmer
Messages: 2
Registered: May 2002
Junior Member
I have date field I'm trying to load.

01232002 0800 AM is input field

ctl file format is 'mmddyyyy hhmi AM'

this doesn't work. What is thc corret format or what do
I have to do to the input file?
Re: SQLLDR date/time format with time like 0400AM [message #70351 is a reply to message #70349] Fri, 31 May 2002 07:50 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
seems to be working for me?

<u>dates.ctl</u>

 LOAD DATA
 INFILE 'dates.dat'
 INSERT
 INTO TABLE test_load
 ( dates POSITION (1:10) DATE "MMDDYYYY HHMI AM")
 

<u>dates.dat</u>

     12171980 1200 AM
     02201981 1200 AM
     02221981 1200 AM
     04021981 1200 AM
     09281981 1200 AM
     05011981 1200 AM
     06091981 1200 AM
     12091982 1200 AM
     11171981 1200 AM
     09081981 1200 AM
     01121983 1200 AM
     12031981 1200 AM
     12031981 1200 AM
     01231982 1200 AM
  

D:OracleOra81BIN>sqlldr userid=mag/mag@high9i control=dates.ctl

SQL*Loader: Release 8.1.6.0.0 - Production on Fri May 31 11:41:49 2002

(c) Copyright 1999 Oracle Corporation.  All rights reserved.

Commit point reached - logical record count 15

Re: SQLLDR date/time format with time like 0400AM [message #70371 is a reply to message #70349] Tue, 04 June 2002 11:08 Go to previous messageGo to next message
Artis Palmer
Messages: 2
Registered: May 2002
Junior Member
Thanks,
After seeing your answer and example I looked at my input data and it had tab characters. Took them out and it ran like a champ.

Thanks
Re: SQLLDR date/time format with time like 0400AM [message #70399 is a reply to message #70349] Fri, 07 June 2002 12:30 Go to previous message
Mike
Messages: 417
Registered: September 1998
Senior Member
dates.ctl
----------------------------------------------------
LOAD DATA
INFILE 'dates.dat'
INSERT

INTO TABLE test_load
( dates POSITION (1:16) DATE "MMDDYYYY HHMI AM")
----------------------------------------------------
POSITION (1:16) IS OPTIONAL IF U HAVE ONLY ONE COLUME IN UR DATES FILE
----------------------------------------------------
dates.dat
12171980 1145 AM
02201981 1200 PM
02221981 0530 AM
------------------------------------------------------

WORK FOR ME TOO. GOOD LUCK.
Previous Topic: Mapping 1 column in Input File to Multiple Table Columns
Next Topic: SQL*LOADER (data with carriage return characters)
Goto Forum:
  


Current Time: Mon Apr 29 09:41:01 CDT 2024