|
|
Archives of the TeradataForum
Message Posted: Fri, 30 Mar 2007 @ 19:32:29 GMT
Subj: | | Re: Function for finding minimum among multiple values |
|
From: | | Geoffrey Rommel |
Another possibility is to create a user-defined function with multiple specific functions. For instance, if you know you'll never need more
than five values, you would create 5 specific functions:
rowmin1(a)
rowmin2(a,b)
rowmin3(a,b,c)
rowmin4(a,b,c,d)
rowmin5(a,b,c,d,e)
If all arguments are defined as FLOAT, any numeric type can be passed to the function. Then create one UDF called 'rowmin' that
references all 5 of these as specific functions.
A lot of trouble to go to, maybe, but it is an option.
| |