db2 timestamp to oracle timestamp

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
alvarez-m
Participant
Posts: 13
Joined: Tue Nov 16, 2004 3:12 pm

db2 timestamp to oracle timestamp

Post by alvarez-m »

Hi All,

I am having problems moving timestamp data from DB2 to Oracle.

For Instance, a typical db2 timestamp value is 2004-03-31-15.01.37.840804

I can not load that value in an oracle timestamp(6), I get a conversion error. Interestingly, I am able to load the value up to the seconds
with zeroes for milliseconds: 2004-03-31-15.01.37.000000. However, I would like to bring the milliseconds too.

Max.
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

Try reformatting your date to the following before passing it to Oracle:

2004-03-31 15:01:37.840
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
Check with your DBAs for the exact precision the date column have (it might not had miliseconds)
and transform the input date accordingly.

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
gpatton
Premium Member
Premium Member
Posts: 47
Joined: Mon Jan 05, 2004 8:21 am

Post by gpatton »

Define the timestamp for DB2 as Varchar(26) when you read it from DB2.
diamondabhi
Premium Member
Premium Member
Posts: 108
Joined: Sat Feb 05, 2005 6:52 pm
Location: US

Post by diamondabhi »

use Oconv(link.columnname"D D-M-Y,[,A3,2]")
Post Reply