Page 1 of 1

Trimming Leading 0's alone

Posted: Thu Oct 14, 2010 4:26 am
by prem84
Hi,
I have the following scenario

My source is Decimal[20,4]
my data is like
00893.5500
00450.0000
But i want the output as
893.55
450.00
when i tried decimal_to_string with suppress_zero i am getting 450.00 as 450
but i want it as 450.00

Posted: Thu Oct 14, 2010 4:36 am
by dsa
try this:

Trim(DecimalTostring(In.Col),'0','L')

Posted: Thu Oct 14, 2010 4:54 am
by prem84
I tried it i gave target as varchar[24] but still i am getting as 00000893.55 and 000000450.000

Posted: Thu Oct 14, 2010 5:16 am
by prem84
Hi,
Sorry made some mistake.
I got it but for negative integers it is not working.
-00890.54 is stil as -00890.54