Implicit converison in Aggregate stage
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 296
- Joined: Sun Nov 16, 2008 7:41 pm
Implicit converison in Aggregate stage
Hello All
In a datastage job i am feeding a field named Net_Am (Decimal[38,10]) from sort stage to an aggregate stage. This stage will calculate the sum of the Net_Am field.
I fed this sum field to a new field called Sum_Net_Am with datatype
Decimal(39,12) in aggregator. When i run the ob i am getting the below error.
Aggregator_13: When checking operator: When binding output interface field "NET_WP_AM" to field "NET_WP_AM": Implicit conversion from source type "dfloat" to result type "decimal[39,12]": Possible range/precision limitation.
Where is this dfloat coming from?
In a datastage job i am feeding a field named Net_Am (Decimal[38,10]) from sort stage to an aggregate stage. This stage will calculate the sum of the Net_Am field.
I fed this sum field to a new field called Sum_Net_Am with datatype
Decimal(39,12) in aggregator. When i run the ob i am getting the below error.
Aggregator_13: When checking operator: When binding output interface field "NET_WP_AM" to field "NET_WP_AM": Implicit conversion from source type "dfloat" to result type "decimal[39,12]": Possible range/precision limitation.
Where is this dfloat coming from?
-
- Premium Member
- Posts: 296
- Joined: Sun Nov 16, 2008 7:41 pm
Re: Implicit converison in Aggregate stage
reachmexyz wrote:Hello All
In a datastage job i am feeding a field named Net_Am (Decimal[38,10]) from sort stage to an aggregate stage. This stage will calculate the sum of the Net_Am field.
I fed this sum field to a new field called Sum_Net_Am with datatype
Decimal(39,12) in aggregator. When i run the ob i am getting the below error.
Aggregator_13: When checking operator: When binding output interface field "NET_WP_AM" to field "NET_WP_AM": Implicit conversion from source type "dfloat" to result type "decimal[39,12]": Possible range/precision limitation.
Where is this dfloat coming from?
Can anybody please tell me how can i avoid this?
-
- Premium Member
- Posts: 296
- Joined: Sun Nov 16, 2008 7:41 pm
Even if i put decimal(38,10), i am still getting the same error.girija wrote:Why do you need decimal(39,12) ? I think decimal(38,10) is enough to hold the sum or count.
when i add two numbers like
99.99 with 99.99, result is 199.98.
Left part of the result decimal now increased to 3 while the source decimal is 2
Somehow suspect he stated that in response to your "38,10 should be enough" comment...girija wrote:99.99 + 99.99 = 199.98
What else do you expect? Did you any warning when you run your job?
Anyway, in answer to the issue, in the aggregator properties, under aggregations, select "Default To Decimal Output" and set to 39,12... or 38,10 or whatever else you want...