Interesting. I think SQL Server's behavior can be explained if you compare this statement:SELECT f.[Id], [Description] = CASE WHEN b.[Description] IS NOT NULL THEN b.[Description] ELSE f.[Description] ENDFROM [dbo].[Foo] AS fLEFT OUTER JOIN [dbo].[Bar] AS bON f.[Id] = b.[Id]ORDER BY f.[Description] ASC
with this:SELECT f.[Id], CASE WHEN b.[Description] IS NOT NULL THEN b.[Description] ELSE f.[Description] ENDFROM [dbo].[Foo] AS fLEFT OUTER JOIN [dbo].[Bar] AS bON f.[Id] = b.[Id]ORDER BY f.[Description] ASC
Notice in the second statement, I didn't give the second column a column name of "Description" (left it blank instead). I think the problem is that when you named the column with the CASE statement "Description", SQL Server ordered by it in the ORDER BY clause. I know you told it to order by "f.[Description]", but it seems that it ignored the "f." part and basically did this: ORDER BY [Description] ASC. So it seems SQL Server will order by a column that is not named in the SELECT list, unless that same column name appears in the SELECT list as an aliased column name. This behavior occurs in SP3 too, not just SP4. I wouldn't really call this a bug - just something that has to be understood about how SQL Server will behave.