Go to the FreeLists Home Page Home Signup Help Login
 



Browse oracle-l: This Month's ArchiveMain Archive PageRelated postsPrevious by DateNext by Date

Re: Date conversion question

  • From: August Spier <gspier@xxxxxxxxxxx>
  • To: Harvinder.Singh@xxxxxxxxxxxxx
  • Date: Wed, 3 Oct 2007 17:45:12 -0400
Harvinder,

It's a multi-step process. First load the data into a column of type "char" (CHAR_COL). Second, add a column of type "date" (DATE_COL). Third, analyze the values you have. Fourth, build the PL/SQL (or any other programming to you prefer) to update each row setting the DATE_COL to be TO_DATE(CHAR_COLUMN,'<date format of your choice>') based on the value in CHAR_COL. (If length(CHAR_COL) = 6 AND SUBSTR (CHAR_COL,1,2)=99 THEN ...

r and good luck,

Gus

On Oct 3, 2007, at 3:44 PM, Harvinder Singh 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



--
http://www.freelists.org/webpage/oracle-l


Other related posts:

  • Date conversion question
  • RE: Date conversion question
  • RE: Date conversion question
  • RE: Date conversion question
  • RE: Date conversion question
  • Re: Date conversion question
  • RE: Date conversion question
  • Re: Date conversion question
  • RE: Date conversion question
  • Re: Date conversion question
  • RE: Date conversion question
  • RE: Date conversion question




  • [ Home | Signup | Help | Login | Archives | Lists ]

    All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
    Everything else ©2008 Avenir Technologies, LLC.