Hi,
I have the value of input column as 99.99 whose metadata type is Decimal(5,3),this is further divided by 100 in the transformer stage and the output is coming as 1.0, the datatype in output is same as Decimal(5,3).But I require the value to be 0.999 and not as 1.0 without rounding off.Is there any way we can get the decimal value without rounding off.
Decimal round off
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3
- Joined: Mon Nov 17, 2003 2:34 pm
chagne the data type
Last edited by gopalreddy27 on Thu Nov 15, 2007 1:00 pm, edited 2 times in total.
-
- Participant
- Posts: 3
- Joined: Mon Nov 17, 2003 2:34 pm
Re: Decimal round off
[quote="ag_ram"]Hi,
I changed the target to float at the intermediate step it's working fine,but my target is still decimal(5,3),so at the target it's getting rounded off.
I changed the target to float at the intermediate step it's working fine,but my target is still decimal(5,3),so at the target it's getting rounded off.
Hi,
Ya Maveric my target is a database, you meant to swithoff the RCP in the datastage administrator right.
I have found one solution for this problem,that is after dividing the decimal by 100 convert the value to Float as suggested by gopal(Thanks
) and futher we can use a transformer stage to use a function DFloatToDecimal(column name,'trunc_zero'),this function will Discard any fractional digits to the right of the rightmost fractional digit supported in the destination, regardless of sign.Thus if target is Decimal(in my case) its working.
Ya Maveric my target is a database, you meant to swithoff the RCP in the datastage administrator right.
I have found one solution for this problem,that is after dividing the decimal by 100 convert the value to Float as suggested by gopal(Thanks
![Smile :)](./images/smilies/icon_smile.gif)
Re: Decimal round off
ag_ram wrote:Hi,
I have the value of input column as 99.99 whose metadata type is Decimal(5,3),this is further divided by 100 in the transformer stage and the output is coming as 1.0, the datatype in output is same as Decimal(5,3).But I require the value to be 0.999 and not as 1.0 without rounding off.Is there any way we can get the decimal value without rounding off.
divide it by 100.000
dan