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

Home -> Community -> Usenet -> c.d.o.server -> Re: sql loader time field only no date

Re: sql loader time field only no date

From: Noel <tomekb_at_softman.pl>
Date: Fri, 7 May 2004 16:13:48 +0200
Message-ID: <c7g5il$qru$1@inews.gazeta.pl>

> thanks for the clue. I appreciate you taking the time to answere. I do
> not understand however how I can make this work in a sql loader
> control file.
> Pointing out the "mm is month not minutes" is a help.
> I guess I would need to have the '10:18:22.4' be a variable in
> select to_date('10:18:22.4','hh:mm:ss:d') from dual;

I gave you clues instead of hot solution to force you to solve it by yourself. :-)

You need to change only last line of your controlfile, using correct data_mask, which match your data format.

 LOAD DATE
 APPEND INTO TABLE ATTEMPT_REC
 FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'  (

     node      char,
     gateway   char,
     accId     char,
     timeZone  char,
     starDate  date "MM/DD/YYYY",
     startTime timestamp "hh24:mi:ss.dd"
 )

You can use sql funcions in control file:

 LOAD DATE
 APPEND INTO TABLE ATTEMPT_REC
 FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'  (

     node      char,
     gateway   char,
     accId     char,
     timeZone  char,
     starDate  date "MM/DD/YYYY",
     startTime date  "TO_DATE(:startTime,'hh24:mi:ss.dd)"
 )
--
TomekB
Received on Fri May 07 2004 - 09:13:48 CDT

Original text of this message

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