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: SQL*Loader time format?

Re: SQL*Loader time format?

From: cbantzer <christian_bantzer_at_psmfc.org>
Date: Wed, 09 Feb 2000 08:14:43 -0800
Message-ID: <38A19273.615DEA5C@psmfc.org>


You COULD use date, I am sure. But what does your time mean? (I'm assuming it's just a time, i.e. without a date, right?) Is it the time today? Or just a time on any day?

If you use the date data type the value will have a date associated with it. If you don't specify it it seems to default to the 1st of the current month.

SQL> create table tmp (d date);

Table created.

SQL> insert into tmp values(to_date('9:30','HH24:MI'));

1 row created.

SQL> select to_char(sysdate,'yyyy-mm-dd hh24:mi'),   2 to_char(d,'yyyy-mm-dd hh24:mi') from tmp;

TO_CHAR(SYSDATE, TO_CHAR(D,'YYYY-

---------------- ----------------

2000-02-09 07:55 2000-02-01 09:30

Depending on what you want to do with the data, this might not be what you want. Other options would be to load the data into a/multiple number column(s) or a varchar.

For one number column you'd have to convert the minutes and seconds to hours, e.g. 12:30:05 would become
12+30/60+5/3600.

the possibilities are endless, it all depends on what you want to do with the data once it's in the database.

Christian

News wrote:
>
> Hello everyone. I'm just learning Oracle and SQL*Loader and I'm in the
> middle on an import from dataease into Oracle 8i. I can't seem to find
> anything in the documentation about formatting time in my control file for
> SQL*Loader? Can I use DATE? If not, can I format time?
> Any suggestions are appreciated!
> Lesley
Received on Wed Feb 09 2000 - 10:14:43 CST

Original text of this message

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