The Empirical Rule
I am resuming technical blogging after a gap of nearly a month. I will continue to blog my re learning...
2017-03-02 (first published: 2017-02-27)
2,548 reads
I am resuming technical blogging after a gap of nearly a month. I will continue to blog my re learning...
2017-03-02 (first published: 2017-02-27)
2,548 reads
J.C. Penney is one of the oldest and most storied retailers still in existence in the United States. For years,...
2017-03-02
383 reads
I’ve been working with containers for a while now and one of the questions that always gets asked when I...
2017-03-01
2,016 reads
I see a lot of confusion when it comes to Azure Data Factory (ADF) and how it compares to SSIS....
2017-03-01
457 reads
One of the most common ways to get an event notification is by email. So what happens when you get...
2017-03-01
389 reads
Step By Step configuring Windows 2012 R2 fail over cluster How to setup windows cluster for Always on Availability Groups
AlwaysOn Availability Groups: Step by Step Setup Step by Step procedure to...
2017-03-01
8 reads
Step By Step configuring Windows 2012 R2 fail over cluster How to setup windows cluster for Always on Availability Groups
AlwaysOn Availability...
2017-03-01
672 reads
On Monday, Redgate released v1.0 of SQL Clone, and I’m excited that the product is finally available. I’m excited because...
2017-03-01
676 reads
Hello Dear Reader, one year ago today it was leap year, February 29th 2016. So I'm a year older, the big four zero.... 40. A little wiser? Maybe. Despite...
2017-03-01
13 reads
For this blog post I want to discuss the meaning behind SQL Server: Memory Manager\Target Server Memory (KB) and SQL...
2017-03-01
455 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 Using CHOOSE()
Comments posted to this topic are about the item Re-Seeding a Broken Log Shipping...
Comments posted to this topic are about the item The DBA is Dead! Long...
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