Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: sqlldr & Date/time
> 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
![]() |
![]() |