Decimal formatting

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
dsrules
Premium Member
Premium Member
Posts: 76
Joined: Sun Nov 28, 2004 8:56 pm

Decimal formatting

Post by dsrules »

Hello ,
I have a requirement to convert the decimals values (generated as an output of aggregator ) to standarformat of xx.xx.

Example :

.32 -> 00.32
-1.5 -> -01.50
8 -> 00.80

I can do this in sql query , but as soon as the data gets processed by datastage aggregator , the decimal formatting just vanishes .

Any help appreciated .
______________________________________
"Everytime I close the door on reality, it comes in through the windows." - Jennifer Yane
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Non-significant zeroes are not part of a "decimal" format. If you want to preserve / add those, you'll need to target a string and use a function like FMT().
-craig

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