My input column is decimal[20,4]
My values are 83.2356,98.2345
i want it to round to 2 decimal places
do i have to give my target as decimal[20,2]
i tried using decimal_to_decimal(inputcol,"ceil")
But no luck
Rounding to 2 decimal places
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Please advise what these issues were, and how you discovered and resolved them. This will assist any future searchers who have the same problem. Then please mark this thread as Resolved using the green button at the top of the page.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Hi Guys,
Sorry for the late update
Decimal_to_decimal(inputcolumnname,"ceil") works fine when rounding to 2 decimal places.My source column was decimal[20,4] and my destination i gave as Decimal[20,2].The problem i encountered error due to using a transformer and passing the modified column again to a target column of Decimal[20,4].I changed it to Decimal[20,2] and it works fine now.
Sorry for the late update
Decimal_to_decimal(inputcolumnname,"ceil") works fine when rounding to 2 decimal places.My source column was decimal[20,4] and my destination i gave as Decimal[20,2].The problem i encountered error due to using a transformer and passing the modified column again to a target column of Decimal[20,4].I changed it to Decimal[20,2] and it works fine now.