How to convert sybase timestamp to Oracl timestamp

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

us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

As you might be aware that PX is too pricky about the Datatypes. A simple solution will be to analyze your Source file at row 90 and you will understand why this row is giving problem. It might be possible that you are passing a Empty value for that field or It is not matching with the length(26).

This might be a typo i guess:

Code: Select all

Jan 10 2007 10:30:31:246AM
should be
Jan 10 2007 10:30:31.246AM
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I think the timestamp format is ok. Dont read it as timestamp. Read it as varchar. Feed it to the C routine and let it take care of the rest. Once you get it into correct format and apply StringToTimestamp() to it, it will be fine.
Again, Read it as varchar. The C routine expects a string as its input variable.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
jherr22
Premium Member
Premium Member
Posts: 56
Joined: Mon Jan 29, 2007 3:24 pm
Location: Denver
Contact:

Thanks

Post by jherr22 »

Thanks, it is now working.
-- john
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please mark thread as resolved.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Good to know. Make sure you add more comments to the routine if required. C is such a language that a few days down the road you wont know what the code is doing.
You can mark the post as Resolved now.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply