Min Function On Decimals

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
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Min Function On Decimals

Post 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?
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
chandra.shekhar@tcs.com
Premium Member
Premium Member
Posts: 353
Joined: Mon Jan 17, 2011 5:03 am
Location: Mumbai, India

Post 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.
Thanx and Regards,
ETL User
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Post 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?
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
Post Reply