>Lutz :
>
>Good points. However, I only really need 6 parms so 20 is overkill. And the reason I am doing the loop is because I'm being lazy. If I need more speed I will definitely consider the case statement.
>
>George
When you use UDF in your SELECT in that UDF you can use biult-in MIN()/MAX() functions.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.