DevOps and Automation Will Eliminate the DBA
I’ve been reading about the death of the DBA ever since I first made the jump from full time developer...
2019-01-23 (first published: 2019-01-14)
2,704 reads
I’ve been reading about the death of the DBA ever since I first made the jump from full time developer...
2019-01-23 (first published: 2019-01-14)
2,704 reads
For several years, I ran a regular feature on this blog, Speaker of the Month. I attend a lot of...
2019-01-22
164 reads
There is one truth that I can say about technology with an absolute certainty: It’s going to change. Get your...
2019-01-21
165 reads
Gathering metrics is quite difficult if there are no queries. So, if you’re working in non-production environments, but you still...
2019-01-17 (first published: 2019-01-07)
2,345 reads
It is entirely possible to try to JOIN two tables on almost any field, as long as the two data...
2018-12-21 (first published: 2018-12-03)
2,524 reads
Our boss came to us and said, “We need one more webinar to round out the year.” Well, we’re just...
2018-12-17
180 reads
The question that came up during a recent class I was teaching was: What if you have a plan guide...
2018-12-11 (first published: 2018-11-26)
1,823 reads
We’re seeing more and more GDPR-style laws coming out from various governments. With the GDPR starting to do enforcement at...
2018-12-10
242 reads
Query Store plans and the plans in cache are identical, right? There won’t be differences because the plan that is...
2018-12-03 (first published: 2018-11-19)
2,020 reads
Once upon a time, someone, somewhere, wrote a list of bad query performance tips and they’ve been copied all over...
2018-11-20 (first published: 2018-11-12)
3,244 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