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
vs.
The week of SQLSaturday Nashville would prove to be a most eventful week. Monday I would be on my work...
2018-02-01
133 reads
Earlier this week the folks at PASS reached out to last year’s speakers asking us to share a story of...
2018-01-27
141 reads
This is part 2 of 2 on taking smart backups. I wrote a previous blog on how to use configuration...
2018-01-23
149 reads
This T-SQL Tuesday is brought to us by Arun Sirpal (b | t) and wants to write about a technical challenge...
2018-01-09
148 reads
This is part 1 of 2 part series on taking smart backups. Part 1 will be taking smart transaction logs...
2018-01-02
192 reads
Just in case you missed it I wrote a blog post for Idera on creating PowerShell module using Plaster you...
2018-01-01
134 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