Loading into Oracle table

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sshettar
Premium Member
Premium Member
Posts: 264
Joined: Thu Nov 30, 2006 10:37 am

Loading into Oracle table

Post by sshettar »

Hi All,

Well i have a question , i'm here extracting data from the mainframes using cff and later doing some validation using transformer and finally loading into oracle table .
well few of the data from source has some fields which are dates but their datatypes are varchar
few sample data are
02/28/07
04/01/04
now my question is , in my oracle table these fields are of type timestamp.
well i converted the dates using oconv and iconv to 2007-02-28 , 2004-04-01
but the issue is , am i suppose to add the time values to it in order to change it to timestamp.
but the source data doesnt have any time attached to it .
what should i do about this issue now?
will the oracle table give any errors ?

Help needed

Thanks in advance
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

append zeros for hours minutes and seconds to the source data and make it as per oracles requirments.
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Re: Loading into Oracle table

Post by I_Server_Whale »

sshettar wrote:2007-02-28 , 2004-04-01
Make them,
2007-02-28 00:00:00 and 2004-04-01 00:00:00 like advised.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What is the actual datatype in the Oracle table - DATE or some flavor of TIMESTAMP?
-craig

"You can never have too many knives" -- Logan Nine Fingers
sshettar
Premium Member
Premium Member
Posts: 264
Joined: Thu Nov 30, 2006 10:37 am

Post by sshettar »

Thanks for the suggestions ,
but looks like oracle takes the time as 00:00:00 by default if that isnt presnt in the data .
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

depends on how your table was created.

no credits to oracle for that. :-)
Post Reply