Page 1 of 1

Min Function On Decimals

Posted: Tue Jun 04, 2013 11:41 pm
by jerome_rajan
Hi All,

I've been trying to use the MIN function in the parallel transformer to find the minimum between two decimal values but always got an error citing that the decimal value is out of range.
I realised, after some searching, that the output of the MIN function is an integer. Is there a straightforward approach to finding MIN/MAX between decimals?

Posted: Wed Jun 05, 2013 1:30 am
by chandra.shekhar@tcs.com
We faced the same issue in our project.
Either you can convert the incoming columns into Bigint and then apply the MIN function.
Or you can use a typical If..then.. Else Statement and check using greater/less then function.

Posted: Wed Jun 05, 2013 1:51 am
by jerome_rajan
BigInt not an option since we have decimal values coming in. Have already implemented with if-then-else. Just wanted to know if there's a more easy-on-the-eye solution. Parallel Routine may be?