Convert String to Decimal

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
tbharathkumar
Participant
Posts: 26
Joined: Mon Aug 27, 2007 6:27 am
Location: Des Moines

Re: Convert String to Decimal

Post by tbharathkumar »

This may help(Havn't tested it :-)),

StringToDecimal(Trim(Trim(<string>,"+","A"))),"0","B"))
Regards,
Bharath Tipirisetty
tbharathkumar
Participant
Posts: 26
Joined: Mon Aug 27, 2007 6:27 am
Location: Des Moines

Post by tbharathkumar »

if you are writing to a file then remove stringtodecimal function.
Regards,
Bharath Tipirisetty
tbharathkumar
Participant
Posts: 26
Joined: Mon Aug 27, 2007 6:27 am
Location: Des Moines

Post by tbharathkumar »

use functions like NUM to identify . and set it to zero
Regards,
Bharath Tipirisetty
Post Reply