Page 1 of 1

How to eliminate leading zero's in Decimal type column value

Posted: Thu Oct 18, 2007 5:27 am
by Sridhar Sivakoti
Hi,

My requirement is to find the length of the Decimal datatype column which is coming from source(Sequential file).

When I am trying to find the length of this column I am not getting the actual legths, I am getting the datatype length.

Example: ABC column, declared as Decimal(15). Value is 103.

I am getting the length as 17 instead of 3. I think it's considering leading zero's and decimal.

How can I get the length as 3.

Here I can not change the datatype from decimal to integer.

How can I eliminate the leading zero's, Is there any function in Transformer?

Please help on this issue.

Thanks

Re: How to eliminate leading zero's in Decimal type column v

Posted: Thu Oct 18, 2007 5:48 am
by carmenh
DecimalToString(JOIN_OK.IMSI_BSCS,"suppress_zero")

Posted: Thu Oct 18, 2007 7:50 am
by DSguru2B
You can use the AS_INTEGER() function and then take the length of that.

Posted: Mon Oct 22, 2007 4:08 am
by Sridhar Sivakoti
DSguru2B wrote:You can use the AS_INTEGER() function and then take the length of that.
Thanks DSguru2B.