T-SQL Tuesday #74: Be the Change Round-up
Thanks to everybody that participated in this month’s T-SQL Tuesday. A big thanks to everyone who wrote a participating blog...
2016-01-20
673 reads
Thanks to everybody that participated in this month’s T-SQL Tuesday. A big thanks to everyone who wrote a participating blog...
2016-01-20
673 reads
Welcome to my contribution for T-SQL Tuesday 74 being hosted by me. So special thanks to me for hosting it....
2016-01-12
747 reads
Happy New Year and welcome to another T-SQL Tuesday (number 74 to be exact). This time of the year, everyone...
2016-01-08 (first published: 2016-01-06)
2,150 reads
Earlier this week, the Database Strategy Team at my company was contacted about queries that were failing on one specific...
2015-12-10
1,607 reads
T-SQL Tuesday is a monthly community-wide blogging event created by Adam Machanic (blog|@AdamMachanic), and everyone is invited to particpate. This...
2015-12-08
1,901 reads
I’m sure most if not all of you are familiar with the meme “You had one job”. I was reminded...
2015-11-24
704 reads
Join me Friday, January 29, 2016 for a full day of performance tuning training as part of SQLSaturday 461 in...
2015-11-12
639 reads
PASS Summit 2015 is over and of course, no PASS Summit is complete without also attending SQLSaturday Oregon. Below are...
2015-11-04
629 reads
I’ve had some good times in the Seattle area. I’ve lived in the Seattle are since 1987 and graduated high...
2015-10-25
584 reads
Replication is still a major component of SQL Server today even with Availability Groups as an alternative to certain scenarios....
2015-10-01
701 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