Monday, May 08, 2006 - Posts

Neat trick to find max value of multiple columns

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/Neat trick to find max value of multiple columns
The new RSS feed is here

Finding the maximum value of multiple columns in a single row is not too easy to do. So I thought.

If you've got 2 columns its not bad using a CASE statement is easy, if you've got 3 it becomes tricky, 4 it gets really messy and the code just is ugly.

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/Neat trick to find max value of multiple columns