Page 1 of 1

DB2 to Oracle Timestamp conversions

Posted: Mon Sep 11, 2006 5:22 am
by hema177
Hi

Enterprise doesn't seem to use Oconv etc for Timestamp conversions. Would be grateful if anyone can give me any ideas regarding converting timestamps from DB2 source to Oracle Target. I can't get the transformer to compile at all if I try doing just a straight -through copy. Error says "Error in output column derivation expression for column RETURN_DT in link toOracleUpdates. Invalid conversion requested from a date to a timestamp."

Any suggestions?

Posted: Mon Sep 11, 2006 7:24 am
by emma
First search the PX forum for Oconv, there is something that could help you.

Posted: Mon Sep 11, 2006 9:25 am
by thumsup9
You cant use OCONV in Parallel jobs.one way to do this is to do TimestampToString and then StringToTimestamp functions to migrate DB2 timestamp to Oracle Timestamp.

StringToTimestamp(TimestampToString(inputdate,%yyyy-%mm-%dd %hh:%nn:%ss),%yyyy-%mm-%dd %hh:%nn:%ss)

Check the format of timestamp in Both DB2 and oracle

Posted: Mon Sep 11, 2006 3:38 pm
by ray.wurlod
If it's a timestamp, it should be able to copy straight through (perhaps with an adjustment to the fractional seconds).

[Oconv() does not work with timestamps even in server edition.]

Posted: Fri Sep 15, 2006 4:54 am
by hema177
ray.wurlod wrote:If it's a timestamp, it should be able to copy straight through (perhaps with an adjustment to the fractional seconds).

[Oconv() does not work with timestamps even in server edition.] ...
Hi Ray,

Thanks for this. It's able to copy straight through if I change the Target datatypes in the transformer to 'Date' instead of 'TimeStamp'. I am using DRS Stage as Source (DB2) and Oracle Stage as Target. Not sure what the issue is.

Thanks Again.

Hema

Posted: Fri Sep 15, 2006 5:06 pm
by ray.wurlod
Oracle also doesn't have a specific TimeStamp data type. All Date data types are stored with time component.