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

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



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


Other related posts: