Example of nested case density in SQL Server

Rajnilari2015
Posted by Rajnilari2015 under Sql Server category on | Points: 40 | Views : 316
Declare @x int = 1

Select
case when @x <= 11 then
case when @x <= 10 then
case when @x <= 9 then
case when @x <= 8 then
case when @x <= 7 then
case when @x <= 5 then
case when @x <= 4 then
case when @x <= 3 then
case when @x <= 2 then
case when @x<= 1 then
10
End End End End End End End End End End
End as "Case Density"


Case Density
--------
10

Comments or Responses

Login to post response