String to Decimal 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
Shree0410
Participant
Posts: 70
Joined: Tue Nov 29, 2005 7:25 pm

String to Decimal Issue

Post by Shree0410 »

My input column is A - CHAR(9) with value of 000332422, My output should be 00.0332422.

I used a Decimal(9,7) for my output, but it writes 00.000000.

How do I resolve this?

Thanks, as always
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Divide the column by 10000000. Or use FMT to shift the decimal point over the correct number of places.

:!: You marked this as a Server question so you got a Server answer.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Shree0410
Participant
Posts: 70
Joined: Tue Nov 29, 2005 7:25 pm

Post by Shree0410 »

hmm..this should be parallel.

Can you tell me what it needs to get it done in parallel
Shree0410
Participant
Posts: 70
Joined: Tue Nov 29, 2005 7:25 pm

Post by Shree0410 »

hmm..this should be parallel.

Can you tell me what it needs to get it done in parallel
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

StringToDecimal(Left(InLink.TheString,2) : "." : Right(InLink.TheString,7))
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Shree0410
Participant
Posts: 70
Joined: Tue Nov 29, 2005 7:25 pm

Post by Shree0410 »

Thanks, much
Shree0410
Participant
Posts: 70
Joined: Tue Nov 29, 2005 7:25 pm

Post by Shree0410 »

Thanks, much
Post Reply