conerting a decimal(12,3) to decimal (9,2)

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
sravanthi
Participant
Posts: 83
Joined: Fri Jun 02, 2006 5:37 am

conerting a decimal(12,3) to decimal (9,2)

Post by sravanthi »

Hi

My source column data is coming as decimal(12,3) and i have to insert into target column with data type as decimal (9,2).

I have used decimalto decimal(column,"floor").It was not working.

Is there any other possible solution for this?

Thanks!
sravanthi
jayantthakore
Participant
Posts: 42
Joined: Tue Jan 18, 2005 5:48 am

Post by jayantthakore »

TRY THIS :
DecimalToDecimal(Column name,[2])
This should do it.
regards,
Jayant S Thakore
sravanthi
Participant
Posts: 83
Joined: Fri Jun 02, 2006 5:37 am

Post by sravanthi »

jayantthakore wrote:TRY THIS :
DecimalToDecimal(Column name,[2])
This should do it.
hi jayanth,

it is not accepting that expression.You mean 2 is for floor.
sravanthi
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

DecimalToDecimal should work. you have some option in Modify stage as well. I dont have access to DS right now to get you the right info. But you can optionally convert it to char and trim the 0's it if required and convert it back to decimal.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What will happen when the source value is too large to fit in a decimal[9,2] field?

Please post your exact decimal_to_decimal specification (I am assuming here that you are using a Modify stage).
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