Here I am going to show you a very good example of CHOOSE function, newly introduced in SQL Server 11.0.
Let's take an example, I have a Table having daily temperature records. Take a fake example of January, 2012. I have created a table variable with 31 records and put some rand() values for temperature column.
Now, I have to display temperature status in below manner.
Here I am going to write an query using CHOOSE Function.
Hope,
This example will help you to understand choose function.
This comment has been removed by a blog administrator.
ReplyDelete