Rounding to 2 decimal places

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
prem84
Premium Member
Premium Member
Posts: 25
Joined: Sat Jul 03, 2010 11:55 pm
Location: chennai

Rounding to 2 decimal places

Post by prem84 »

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
prem84
Premium Member
Premium Member
Posts: 25
Joined: Sat Jul 03, 2010 11:55 pm
Location: chennai

Post by prem84 »

Hi,
I resolved it there were some type coversion issues
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

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.
prem84
Premium Member
Premium Member
Posts: 25
Joined: Sat Jul 03, 2010 11:55 pm
Location: chennai

Post by prem84 »

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.
Post Reply