Remembering Reed Jacobson
I just received some bad news and found out that a friend passed away today. Reed Jacobson was one of...
2014-07-16
510 reads
I just received some bad news and found out that a friend passed away today. Reed Jacobson was one of...
2014-07-16
510 reads
What about when statements are sitting in your server, uncompleted and not moving, just hogging resources? Use this script for...
2014-07-16
610 reads
I have a lot of books on my shelves dealing with business intelligence, data warehousing, master data management, and consulting....
2014-07-16
1,226 reads
Most SQLSaturday’s do ok when it comes to finding speakers, the results of an incredible speaker mailing list and a...
2014-07-18 (first published: 2014-07-16)
640 reads
I did an online presentation about PCI and Credit Card Security for BSSUG last night and it went pretty well,...
2014-07-16
681 reads
Here’s the latest update on our registrations. We’re still ahead of all our previous events, that’s good, and we’re 2...
2014-07-16
577 reads
Not to try and steal Satya Nadella’s thunder today at WPC but I’ve got some exciting news of my own to share. I’m excited to say that I’ll be...
2014-07-16
10 reads
Not to try and steal Satya Nadella’s thunder today at WPC but I’ve got some exciting news of my own to share. I’m excited to say that I’ll be...
2014-07-16
13 reads
Not to try and steal Satya Nadella’s thunder today at WPC but I’ve got some exciting news of my own...
2014-07-16
390 reads
When I was in college and taking programming classes (back in the days when “a T-Rex ate my 5.25 inch...
2014-07-22 (first published: 2014-07-16)
9,140 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