Hi
I like to get the maximum value from the values passed. for example Id 1 to 100, I like to get 100 in the derivation in the transformer...In the transformer the maximum() is not allowed...Is there any other functions I can used..
Thank You
Regards - c341
Maximum() Function
Moderators: chulett, rschirm, roy
You can do what Craig mentioned of using a stage variable and check each time whether the new value greater than the stored value and if it is then store the currect value to the stage variable.
Alternatively you can use the Aggregator stage in datastage to do this. Also if you source is table then use the max database function. It's really depend on what you want to do and how many records you have. Cos Aggregator stage can be slow if you have more records.
Thanks
Siva
Alternatively you can use the Aggregator stage in datastage to do this. Also if you source is table then use the max database function. It's really depend on what you want to do and how many records you have. Cos Aggregator stage can be slow if you have more records.
Thanks
Siva
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The Maximum() function that Cameron referred to is to find the largest element in a dynamic array. It is not suited to the requested purpose of finding the maximum value in a column over N rows.
I'd prefer to grab it from source if that were possible, using MAX(colname) in SQL.
I'd prefer to grab it from source if that were possible, using MAX(colname) in SQL.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.