timestamp insert to Date datatype to oracle

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
hargun
Participant
Posts: 188
Joined: Mon May 16, 2011 7:41 pm
Location: United States

timestamp insert to Date datatype to oracle

Post by hargun »

hi,

i have design inserting from DB2 stage to oracle as target.

The column RATE_DATE(TIMESTAMP) in DB2 STAGE and target is oracle having RATE_DATE(DATE) as datatype.

i have tried by inserting the same timestamp to DATE datatype without any conversion and job work fine but i am not able to get the time only date is inserted.

Please help me on this.
Niv0599
Premium Member
Premium Member
Posts: 13
Joined: Tue Apr 10, 2012 11:47 am

Post by Niv0599 »

Did you look at the target data RATE_DATE in oracle table to see if the Timestamp portion is also stored.
Datastage is the best thing that happened to ETL
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Declare the RATE_DATE column with a data type of Timestamp in the job.
-craig

"You can never have too many knives" -- Logan Nine Fingers
hargun
Participant
Posts: 188
Joined: Mon May 16, 2011 7:41 pm
Location: United States

Post by hargun »

i am doing the same giving the timestamp datatype still storing the Date part only.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

How exactly are you verifying this? What does the insert SQL in the stage look like, does it include a TO_DATE function for this field?
-craig

"You can never have too many knives" -- Logan Nine Fingers
hargun
Participant
Posts: 188
Joined: Mon May 16, 2011 7:41 pm
Location: United States

Post by hargun »

please find the SQL which the oracle stage generating

INSERT INTO DIM.STG_NAME(ASSIGNED_DATE) VALUES(:ASSIGNED_DATE).

IT doesn't include to_Date function for this field.
Post Reply