Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 30 Mar 2007 @ 19:32:29 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


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.



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023