• Just thinking off the wall for a moment, would a stored procedure with a case statment containing the values be quicker?

    If the procedure is called often, it would be cached so execution time would be quick. There are no I/O issues so there is no need to think about an index. I think that SQL Server starts reading at the start of a data page until it reaches the record it wants which is the same as a case statement.

    The big downside (and probably a very good reason not to use this approach) is that you would have to recreate the procedure every time you changed the values.

    Any ideas on whether this would be quicker? I'm curious.

    Jeremy