How to convert Varchar to Decimal in Transformer??

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
Harikrishna_V
Participant
Posts: 6
Joined: Sat Mar 13, 2010 11:44 am
Location: Bangalore

How to convert Varchar to Decimal in Transformer??

Post by Harikrishna_V »

Thanks,
Harikrishna.V,Bangalore.
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

Use StringToDecimal()
You are the creator of your destiny - Swami Vivekananda
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

You can just define the datatype on the output link as Decimal and most of the times that should be enough. If not you can always use StringToDecimal.
Kris

Where's the "Any" key?-Homer Simpson
Harikrishna_V
Participant
Posts: 6
Joined: Sat Mar 13, 2010 11:44 am
Location: Bangalore

Post by Harikrishna_V »

kris007 wrote:You can just define the datatype on the output link as Decimal and most of the times that should be enough. If not you can always use StringToDecimal.

Hi,

But I am not sure whether StringToDecimal function will work or not.
We need to use another function i guess.
As you say, changing the data type on output link has worked.
If we have any specific function it would be great.
Thanks,
Harikrishna.V,Bangalore.
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

Harikrishna_V wrote:But I am not sure whether StringToDecimal function will work or not.We need to use another function i guess.
As you say, changing the data type on output link has worked.
If we have any specific function it would be great.
Well..For a start you can start using it and test it to see if it is working. And yes it does work and why would you need another function when you already have one. And how come you marked the topic as resolved? That's confusing :?
Kris

Where's the "Any" key?-Homer Simpson
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As noted, StringToDecimal().
-craig

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