Integer to decimal

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
halpavan2
Participant
Posts: 31
Joined: Fri Apr 18, 2008 5:44 am
Location: Hyderabad

Integer to decimal

Post by halpavan2 »

Hello All,

When i tried to multiply the data getting the following error.

Source data:-

2345
2346
2347
2348

In transformer i am doing this logic 2345*0.08

My source is Integer and while loading with decimal(8,7)

getting the following error

APT_CombinedOperatorController,0: APT_Decimal::ErrorBase: From: the source decimal has even precision, but non-zero in the leading nybble, or is too large for the destination decimal..Record dropped.

Please suggest.

Thanks
Pavan
pavan
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Decimal(8,7) has only one digit to the left of the decimal placeholder, and seven to the right of it. You need a larger precision (at least four more than the scale figure). You probably don't need scale of 7, since your multiplier only has two decimal places. So maybe Decimal(8,2) would suffice.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply