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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Date conversion question

Re: Date conversion question

From: Rumpi Gravenstein <rgravens_at_gmail.com>
Date: Wed, 3 Oct 2007 17:06:28 -0400
Message-ID: <9c9b9dc90710031406t5d432133j8099eb64ddcd5a58@mail.gmail.com>


Harvinder,

Are these valid dates? Some clearly aren't ( "0"). I can think of at least two ways to get this loaded:

  1. Use a column expression (http://tinyurl.com/29k93m) within your Sqlloader control file to convert the data into a valid date.
  2. Load the data into a staging table that has this column defined as a VARCHAR2. Then write a PL/SQL procedure that moves the data from the staging table to the real table. The procedure should include the necessary logic to convert this column into a recognized Oracle date format.

On 10/3/07, Harvinder Singh <Harvinder.Singh_at_metratech.com> wrote:
>
> Hi,
>
> We have a flat file that contains a column and the values are stored as:
> 991123
> 421
> 60823
> 0
> 70930
>
> Now we are moving data from flat file to table and this column will be
> inserted into Date dataype column, What is the way to insert into this
> table and avoid "ORA-01821: date format not recognized" errors.
>
> Thanks
> --Harvinder
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

-- 
Rumpi Gravenstein

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Oct 03 2007 - 16:06:28 CDT

Original text of this message

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