Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: sql loader time field only no date
> 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)")
-- TomekBReceived on Fri May 07 2004 - 09:13:48 CDT