Re: sybase date field to Oracle - sqlldr

  • From: Nigel Thomas <nigel_cl_thomas@xxxxxxxxx>
  • To: john.hallas@xxxxxxxxxx, oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 18 Sep 2007 04:02:17 -0700 (PDT)

----- Original Message ----
From: John Hallas john.hallas@xxxxxxxxxx

Oracle  - Solaris 
I am trying to load dump files from a Sybase database and I am struggling over 
the date columns. The flat files have a date format of “Sep 17 2007  
I know I could edit each file and remove some of the data field but I would 
prefer to do it correct it via sqlloader

Instead of using

   LAST_RESET_TIME timestamp "mon dd yyyy hh:mi:ss AM"

how about 
   LAST_RESET_TIME "to_date(substr(:LAST_RESET_TIME 
,1,20)||substr(:LAST_RESET_TIME ,25,2),'mon dd yyyy hh:mi:ssAM')"

Let SQL*Loader do the editing - assuming you don't need that last :020 from 
your example

Regards Nigel

Other related posts: