How to do DevOps as a SQL Server DBA
You recognize that you need to provide a pipeline for database deployments, that you need to automate as much support...
2015-02-26
1,462 reads
You recognize that you need to provide a pipeline for database deployments, that you need to automate as much support...
2015-02-26
1,462 reads
Parents, you know that feeling you get after you’ve brought home that brand new baby (or in my case, babies) where...
2015-01-30 (first published: 2015-01-26)
6,358 reads
Never forget, we’re making buggy whips. And everybody we know drives little buggies and they need our buggy whips. We’ve...
2015-01-28
1,086 reads
Grant Fritchey reviews Midnight DBA's Minion Reindex, a highly customizable set of scripts that take on the task of rebuilding and reorganizing your indexes.
2015-01-27
2,643 reads
There’s power in naming things. Supposedly some types of magic are even based on knowing the correct names for things....
2015-01-20 (first published: 2015-01-14)
8,487 reads
There’s an old joke that goes, “Doctor, doctor, it hurts when I do this.” While the person in question swings...
2015-01-19
778 reads
The one absolute promise I made about serving on the PASS Board is that I would let you know what...
2015-01-16
531 reads
A while back I wrote about saying “Thank you” to people. Last night I was listening to NPR on my...
2015-01-09
696 reads
This is me on the last cruise
In just a few more weeks I’ll be setting sail on the first of...
2015-01-06
1,089 reads
I love it that my first post of the new year is going to be Speaker of the Month. I’m...
2015-01-02
428 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