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 load problem

Re: SQL load problem

From: Kurt Krieger <kkriegerSPAM_at_erols.com.SPAM>
Date: Sun, 01 Oct 2000 07:05:56 GMT
Message-ID: <39D6E29D.4AD74B3C@erols.com.SPAM>

I solved the same problem by inserting the date value into a 'temp' varchar2 field, then issuing an update command to convert the temp value into the final date value. In my case, I have complete flexibility in the table design, so I can add the temp field. For example...

create table date_test (
temp_date varchar2(20) not null,
real_date date
);

SQL*Loader loads string values into date_test.temp_date.

update date_test set real_date = to_date(temp_date,'YYYYMMDDHH24MISS'); alter table date_test modify (real_date not null);

My table is a temp reporting table, so I left my temp columns in the table. But you can also drop the temp columns if your version of Oracle supports it.

This was a quick workaround for me, but I'd prefer to see the SQL*Loader control file syntax for loading the data directly into the date column.

Kurt

sc wrote:

> I was trying to load data to a table, but the oraiginal data for the DATE
> column is like this:
> "1988269000000", and I always got error message that the format is not
> right, could someone tell me how to load this kind of data into the table?
>
> Thanks
  Received on Sun Oct 01 2000 - 02:05:56 CDT

Original text of this message

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