Hi everybody,
In my transform, I try to divise 2 fields :
A Number 9
B Number 9
My targer is C Decimal 5 scale 2
When I check the result, I never have the number after the comma. It always truncate the value.
For exemple:
A = 27
B = 5
C= 5.00 but the right value is 5.40
How can I revolve that?
If you have the answer I will be very interesting.
Thank for your help
Pey
Result of a division
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Hi All!
I am also experiencing the same problem whenever I perform any form of arithmetic operation on my numeric data . I am using the metadata of the table as I have imported into the table definition. I have several columns defined as NUMBER type hence it's defaulted to DECIMAL(38,0) in the OCI stage.
I was able to do a workaround :D with it in the transformer stage using the string arithmetic operation (SDIV, SMUL). This way I was able to get the decimal place values. However, I need to do aggregation and thus my problem began. There is not much I can do about the aggregator stage thus I am now seeking help on what approach to take.
I would really appreciate any suggestions. Thanks!
Juvin
I am also experiencing the same problem whenever I perform any form of arithmetic operation on my numeric data . I am using the metadata of the table as I have imported into the table definition. I have several columns defined as NUMBER type hence it's defaulted to DECIMAL(38,0) in the OCI stage.
I was able to do a workaround :D with it in the transformer stage using the string arithmetic operation (SDIV, SMUL). This way I was able to get the decimal place values. However, I need to do aggregation and thus my problem began. There is not much I can do about the aggregator stage thus I am now seeking help on what approach to take.
I would really appreciate any suggestions. Thanks!
Juvin