Page 1 of 1

Decimal Conversion

Posted: Tue Jul 17, 2007 4:36 am
by scorpion
Hi All,

I am looking for some simple conversion solution.

My source table is Syabase database table,in that i have a column 'Price'
for this price column,table has values like:

91.569999999999993,
95.792249999999996,
93.677160000000001,
93.459000000000003

And the datatype of the column PRICE in databse is 'Float,Length-8'

but I am extracting it as 'Decimal,lenth-15,scale-2'in source sybase stage.

and I am using the function in transformer like Trim(DecimalToString (Prices_Conversion_Read.PRICE, "suppress_zero") )to covert to varchar.

The problem is in the target records for this column ,it is displaying only 2decimal places.but i need to display 9 decimal places..

present values i am getting in my TARGET is:

91.56,
95.79,
93.67,
93.45

required is:

91.569999999
95.792249999
93.677160000
93.459000000

Can any one help on this.

Posted: Tue Jul 17, 2007 4:47 am
by balajisr
Your decimal scale should be 9 and not 2.

Posted: Tue Jul 17, 2007 6:37 am
by scorpion
Hey,

Thanks balaji....

Its fine now..