Conversion error from varchar to 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

Post Reply
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Conversion error from varchar to Timestamp

Post by synsog »

Hi All

The job was running fine in 7.5.1A. Now we are migrating the project to 8.5.
so our jobs are getting the below warnings.

"Conversion error calling conversion routine timestamp_from_ustring data may have been lost"

My source is database Oracle and we doing conversion in the transformer for timestamp conversion.
the code is like
If IsNotNull(lnk_InputIbsDDNS.AS_OF_DATE) then StringToTimestamp(lnk_InputIbsDDNS.AS_OF_DATE,'yyyy/mm/dd hh:nn:ss') Else NullToEmpty(lnk_InputIbsDDNS.AS_OF_DATE)

Please advise on this how to solve this issue.

Thanks in Advance.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: Conversion error from varchar to Timestamp

Post by SURA »

You can search for timestamp_from_ustring data may have been lost

viewtopic.php?t=126084&highlight=timest ... +been+lost

These might help you.


DS User
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Post by synsog »

Hi Sura,

I tried that also but its not working in my case.

Here source is orace table, souce column data type is varchar 20 nullable yes.but table contain only date part( like 2011-04-20) .

the target table has date(timestamp format) and nullable no.

still i am getting the same error in transformer like "Conversion error calling conversion routine timestamp_from_ustring data may have been lost"
How to procede in this case.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So you don't have a timestamp but rather it's a date. You are telling it you have time information in your string when in fact you do not. Either add a zero time or use StringtoDate instead.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply