StringToDecimal & StringtoTimestamp Issue

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
xinhuang66
Participant
Posts: 161
Joined: Wed Aug 02, 2006 4:30 am

StringToDecimal & StringtoTimestamp Issue

Post by xinhuang66 »

I need to transfer string to Decimal from sequencial file to Oracle.

I don't know why in oracle, when I select the decimal column ( Number in Oracle ), It looks like 00000000, 00000000

By the way, I also need to transfer from string to timestamp, based on a source string like 2007-05-27 12:35:35:123456, by stringTotimestamp(inputstring, "%yyyy-%mm-%dd %hh:%mm:%ss"), And when I select from oralce, it only created a date time column with only date information, no time and timestamp information.

Anybody can help, Thanks a lot!
xin
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

How did you select? By just doing a "Select DATECOLUM from table"? This will give you only the date format that has been masked in your sql tool.
Provide the following

Code: Select all

SELECT TO_CHAR(DATECOLUMN, 'YYYY-MM-DD 24HH:MI:SS') FROM Table
Now you will see the complete timestamp.

As per your other query, what is the length in oracle for that field? Does it have a precision with it or not? If not then its and out of bound decimal number and will show a decimal value only if one exist. It wont show 1.00 for 1.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply