How I became a Data Platform MVP
As I spent last week attending my first MVP Summit in Seattle I thought I’d write this post about how...
2018-03-14
403 reads
As I spent last week attending my first MVP Summit in Seattle I thought I’d write this post about how...
2018-03-14
403 reads
Just a quick post here after the PASS Marathon Webinar during which I talked about the GDPR effects around the...
2018-03-13
1,118 reads
Edit: Now with discount code! We’ll be speaking at SQL Saturday Colorado Springs on Saturday March 24. The day before that, we...
2018-03-13
346 reads
I am pretty hyped to be able to finally announce a new project of mine that I have been working on for...
2018-03-13
376 reads
Welcome to T-SQL Tuesday #100. In a community filled with ADD people like the SQL community (myself included), who would...
2018-03-23 (first published: 2018-03-13)
2,478 reads
The future, 100 months from now: It’s Monday, 6 July 2026. It’s been quite a week since SQL Server Update...
2018-03-13
302 reads
I originally wrote about catch-all queries early in 2009, just as something that I’d seen several times in client code. It turned into the 3rd most popular post ever...
2018-03-13
29 reads
I originally wrote about catch-all queries early in 2009, just as something that I’d seen several times in client code....
2018-03-26 (first published: 2018-03-13)
4,690 reads
It’s T-SQL Tuesday #100. Amazing. I can’t believe this has been going for so many years. I’m proud that I...
2018-03-13
794 reads
It’s T-SQL Tuesday’s 8 year birthday (or close enough), and Adam Machanic has challenged us with the question: what will the world be like when T-SQLTuesday turns 16? Not...
2018-03-13
24 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