Hi,
My source field is Decimal(26,3) and the target field is Decimal(7,0). I just want to have first 7 digits from the incoming value into my target column.
For example,
If incoming value is 1234567890123.999, then the target should have 1234567. I want to manipulate this within a Transformer (parallel) stage only.
Any guidance?
Thanks.
Rounding Decimal in Transformer
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 22
- Joined: Tue Oct 31, 2006 5:16 pm
-
- Participant
- Posts: 30
- Joined: Tue Jan 30, 2007 5:21 am
- Location: bangalore
First try using DecimalToDecimal function in transformer... and check for required output...
If this doesn't work, try this first convert the decimal field into string and use the string function Left() to get the first seven digits.Once you get this, convert this result back to Decimal for target mapping...
thanks,
sanjay
If this doesn't work, try this first convert the decimal field into string and use the string function Left() to get the first seven digits.Once you get this, convert this result back to Decimal for target mapping...
thanks,
sanjay
-
- Premium Member
- Posts: 22
- Joined: Tue Oct 31, 2006 5:16 pm
Prasad, I already mentioned it's a Parallel job and I'm using a parallel transformer. And your reply anyway is not getting into my brain.
Sanjay, I tried doing it your way. DS is not giving proper output for records that have bigger numbers than the INT32 max value.
Could anyone help me out?
Thanks!
Sanjay, I tried doing it your way. DS is not giving proper output for records that have bigger numbers than the INT32 max value.
Could anyone help me out?
Thanks!
-
- Premium Member
- Posts: 22
- Joined: Tue Oct 31, 2006 5:16 pm