Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL*Loader 2 fields->1 field
Load them as seperate columns into a temp table then do a concantenation and a to_date function to convert and insert them. It should look something like this...
insert into table1 select
to_date(col1date||','||col2time,'DD-MON-YY,HH24:MI') FROM TEMP_TABLE;
I just tried and i seems to work fine... here it is
SQL> CREATE TABLE TT2 (VTIME VARCHAR2(10), 2 V
SQL> SQL> SQL> CREATE TABLE TT2 (VDATE VARCHAR2(10),2 VTIME VARCHAR2(10)); Table created.
SQL> INSERT INTO TT2 VALUES ('01-JAN-97','18:10'); 1 row created.
SQL> CREATE TABLE TT3 (VDATE DATE); Table created.
SQL> insert into TT3
2 select to_date(VDATE||','||VTIME,'DD-MON-YY,HH24:MI')
3 FROM TT2;
1 row created.
SQL> SELECT * FROM TT3; VDATE
cheers, Robert Prendin
Vincent Chang <vchang_at_impac.com> wrote:
>Hi, Everybody
> I am using SQL*Loader to load a flat text file data. I need to load
>2 fields (time and date) into 1 field in table (oracle datatype 'date'
>can hold these 2 info in 1 field). Any suggestion for this problem?
>Thanks.
>vincent
Received on Tue Sep 30 1997 - 00:00:00 CDT
![]() |
![]() |