Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: sqlldr & Date/time

Re: sqlldr & Date/time

From: Knut Talman <knut.talman_at_mytoys.de>
Date: Tue, 12 Mar 2002 11:04:26 +0100
Message-ID: <3C8DD2AA.1B4A8ACF@mytoys.de>


> Thanks for the reply.... Unfortunatly I don't want to create a seperate time
> field... Thats how I did it for a fast and dirty work around... What I want to
> do is include the date & time into the same field using the sqlldr. So both
> date & time are in the same field... I know how to do this using an 'insert'
> command.... But I need to use sqlldr. Can anyone help me here? Much thanks

But that is what Ed did! He puts date and time in one column. I repeat his posting:

create table vmstat (
ddate DATE, ttime CHAR(10), vmstat VARCHAR(20) );

I ran this control file:
load data
infile *
append into table vmstat
fields terminated by ","
 (ddate DATE "TO_DATE( :ddate||' '||:ttime, 'dd-mon-yy hhmi')",   ttime CHAR,
  vmstat CHAR)
begindata
30-Jan-02, 0122, 'data'

which loaded one recorded that looked like this: select * from vmstat ;

DDATE                 TTIME      VMSTAT
--------------------- ---------- ------------------------------
Jan302002 01:22:00 AM  0122       'data'
^^^^^^^^^^^^^^^^^^

If you look at it you will see, that the date and the time are combined in the column DDATE.

Regards,

Knut Received on Tue Mar 12 2002 - 04:04:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US