I am a Microsoft Data platform MVP
I am so excited and happy to be chosen to receive the Microsoft Data Platform MVP award. This is my...
2016-07-04
495 reads
I am so excited and happy to be chosen to receive the Microsoft Data Platform MVP award. This is my...
2016-07-04
495 reads
In case you haven't heard, SQL server 2016 is generally available today! If you haven't try it out, you should...
2016-06-02
855 reads
Last time, I talked about cloud backup and the two different ways of doing it – directly and using StorSimple appliance...
2016-05-27 (first published: 2016-05-19)
1,549 reads
It finally comes to this date, 12th April 2016, the end of support for SQL server 2005! SQL 2005 is...
2016-04-12
683 reads
In the previous post, I talked about how we can revamp the backup infrastructure for SQL to backup directly to Azure,...
2016-04-15 (first published: 2016-04-11)
2,209 reads
Backup is one of the major task for DBAs, it has many different options and ways for each companies to...
2016-04-07
1,644 reads
Microsoft accounted yesterday that SQL server will plan run in Linux, with early private preview available today along with full...
2016-03-09
2,266 reads
Previously we discussed about the pre-installation consideration, which can be found here. In the second part of this series, we...
2016-03-01
1,571 reads
I have been wanting to write this for a long time, and finally got time to do it. Which is...
2016-02-29 (first published: 2016-02-23)
2,756 reads
This is one of the hot topic within the DBA community, what should be the best setting for parallelism in your environment? The answer is – it depends! J
Let’s...
2016-01-13
87 reads
By Steve Jones
This is timely, as I’m currently on a boat in the Adriatic taking a...
You can find the slides and SQL scripts for my session “Spice up your...
By SQLPals
How to Clear the SSMS Cache (SSMS 21 and Later) Updated...
Comments posted to this topic are about the item Risk Vs Reward, The never...
Comments posted to this topic are about the item Using CHOOSE()
Comments posted to this topic are about the item Re-Seeding a Broken Log Shipping...
We have this code that sets some status values and then queries them using the CHOOSE() function in SQL Server 2025.
CREATE TABLE Status
(
StatusID INT,
StatusDescription VARCHAR(20)
);
GO
INSERT dbo.Status
(
StatusID,
StatusDescription
)
VALUES
(0, 'Uncategorized'),
(1, 'Active'),
(2, 'Inactive'),
(3, 'Temp');
GO
SELECT CHOOSE(StatusID, 'Unknown', 'Active', 'Inactive', 'Temporary')
FROM Status;
When the SELECT runs, what is returned? See possible answers