Timestamp value automatically getting formatted

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
divine
Premium Member
Premium Member
Posts: 149
Joined: Fri Oct 15, 2004 12:13 am
Location: Toronto,divine_auro@yahoo.co.in
Contact:

Timestamp value automatically getting formatted

Post by divine »

When I populate a timestamp field to the table with value
2007-01-04 10:58:55.263000 it is getting inserted fine.

But, when I read the same record in next job using an OCI stage, it comes out as 2007-01-04 10:58:55.000000

Here if you can see the microsecond value .263000 is automatically getting converted to .000000

can you explain why?
With Regards
Biswajit
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I think this is a limitation. The database accepts timestamp upto 2 digit seconds. It does not like milliseconds. Try doing a command line insert with your data and see if that works.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Raftsman
Premium Member
Premium Member
Posts: 335
Joined: Thu May 26, 2005 8:56 am
Location: Ottawa, Canada

Post by Raftsman »

The timestamp datatype has an extended parm in the column layout that can be set to milliseconds. DataStage accept millisecond but cannot create them.
Jim Stewart
divine
Premium Member
Premium Member
Posts: 149
Joined: Fri Oct 15, 2004 12:13 am
Location: Toronto,divine_auro@yahoo.co.in
Contact:

Post by divine »

DSguru2B wrote:I think this is a limitation. The database accepts timestamp upto 2 digit seconds. It does not like milliseconds. Try doing a command line insert with your data and see if that works.
The database is Oracle 10g. Now when I am inserting the timestamp value, it is getting populated fine with all timestamp miliseconds intact. While I am reading it in DS job using an OCI stage, the milliseconds are comming as all zeros.

I've mentioned timestamp extended as milliseconds. This is crucial, if its a bug as I need to use this field in change capture stage and if date will keep getting formatted like this, I'll always be getting updates and inserts
With Regards
Biswajit
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Eschew the OCI stage if this is critical - the OCI stage doesn't do microseconds properly. Prefer Oracle Enterprise stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply