Saturday, September 27, 2014

Nested CASE expressions in SQL Server 2008 R2

Hi,


you can use nested CASE. something like



CASE
WHEN
<Condition 1> AND <Condition 2> THEN 'Data missing for Condition 1; Condition 2'
ELSE
CASE
...
END

END AS CaseResult
GO


This do not look cleaner, but if this is what you like, then use this.




[Personal Site] [Blog] [Facebook]signature


No comments:

Post a Comment