Exciting New Projects
We Speak Linux
I am super excited to be to have launched this website. We Speak Linux is a place for...
2018-02-07
122 reads
We Speak Linux
I am super excited to be to have launched this website. We Speak Linux is a place for...
2018-02-07
122 reads
A few years ago I wrote what would turn out to be my most-hit blog post (so far) titled "Error...
2018-02-07
415 reads
It was 3am in the morning and I was asleep and enjoying a delightful dream (I knew it was a...
2018-02-07
466 reads
I’ve said before that backups are at once one of the easiest things DBAs do, one of the most important,...
2018-02-15 (first published: 2018-02-07)
1,817 reads
I was using a query on one of my local SQL Servers where I wanted to know what logins were...
2018-02-07
1,102 reads
I am so thrilled to have the opportunity to expand my writing with my first Simple-Talk article posted. Simple- Talk is technical journal and...
2018-02-07
320 reads
Last week Docker announced a feature that I’ve been looking forward to for a while: –
And sure enough, when I...
2018-02-07
1,444 reads
So, I just got finished with a SQL Server Reporting Services (SSRS) scale-out deployment, based largely on this step-by-step guide. Things mostly went...
2018-02-06
426 reads
This article is an effort to dissect the output of the sp_spaceused stored procedure.
Introduction
Understanding the database usage internals and the growth trends...
2018-02-06
468 reads
I recently wrote a post on the BlueGranite blog called Improving Screen Reader Accessibility in Power BI Reports. It contains...
2018-02-13 (first published: 2018-02-06)
2,038 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