>Ok, thanks. I was hoping for a more glorious solution, but that is what I had in mind as well.
May be a UDF will work (with MIN/MAX inside), but you will need to test it. Also, using UDF can lead to other problems.
If it's not broken, fix it until it is.
My Blog