remove zero before decimal point

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
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

remove zero before decimal point

Post by scorpion »

Hi,

I am conevrting one of my input column from decimal to string.

Using DecimalToString function,and getting the values like:

0.3456
1.889907
0.78654

etc,etc..

but the requirement is like ,whenever the values are like '0.',then should not display the 0(zero)in value.

for ex: in my above sample data,i needs to get the values like:

.3456
1.889907
.78654

any one give me some ideas to remove 0 in before decimal point?

thanks in advance..
Thanx&Regards
scorpion
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Post by scorpion »

All,

I resolved this by using Trim function.

i.e Trim(DecimalToString(column,"suppress_zero"), "0", "L")

Now it working fine....

Thanks
Thanx&Regards
scorpion
Post Reply