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: Ed prochak <ed.prochak_at_alltel.com>
Date: 12 Mar 2002 10:16:30 -0800
Message-ID: <e51b160.0203121016.173dab06@posting.google.com>


Knut Talman <knut.talman_at_mytoys.de> wrote in message news:<3C8DD2AA.1B4A8ACF_at_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

Thanks for the support, Knut. But I ended my original message with a question similar to his. : Can the table be loaded only using SQLLDR with no TTIME column in the destination table?

 For fixed field length records it may be possible, but I haven't figured out how to do it for delimited records. Have to use a position specifier but what I read in the manuals, there no way to specify the "field after the next field".

Ed Received on Tue Mar 12 2002 - 12:16:30 CST

Original text of this message

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