Decimal Conversion

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

Decimal Conversion

Post 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.
Thanx&Regards
scorpion
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

Your decimal scale should be 9 and not 2.
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Post by scorpion »

Hey,

Thanks balaji....

Its fine now..
Thanx&Regards
scorpion
Post Reply