Extreme situations require extreme commands
The title is adapted from a child-hood movie of mine and is my daily (database-related) WTF moment and it is...
2017-03-14
387 reads
The title is adapted from a child-hood movie of mine and is my daily (database-related) WTF moment and it is...
2017-03-14
387 reads
Last month Google announced the public beta for Cloud Spanner, and I would like to share few details around this since it’s a big news! So, what exactly is...
2017-03-14
18 reads
Last month Google announced the public beta for Cloud Spanner, and I would like to share few details around this...
2017-03-14
791 reads
In this module you will learn how to use the Image Viewer Power BI Custom Visual. The Image Viewer visual...
2017-03-14 (first published: 2017-03-07)
2,170 reads
In this module you will learn how to use the Stars Power BI Custom Visual. The Stars visual is a...
2017-03-14
851 reads
It’s the time of the month again: the T-SQL Tuesday! This month’s edition is hosted by Kennie Nybo Pontoppidan (blog|twitter) and...
2017-03-14
484 reads
It’s T-SQL Tuesday time again, and this is a good one. The host this month is Kennie Pontoppidan, who I...
2017-03-14
913 reads
Welcome to T-SQL Tuesday #88 being hosted this month by Kennie Nybo Pontoppidan (blog|@KennieNP). This month’s topic is the “daily...
2017-03-14
605 reads
Every once in a while I hear of some technologist say that relational databases are dead; instead, a non-table based NoSQL storage format is the way of the future....
2017-03-14
22 reads
One of the problems with whitepapers is that they get out of date pretty quickly. It’s important to update them...
2017-03-13
548 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