Configuration service database design pattern
In many cases, we are required to store configuration values for an application, application functionalities or user-specific parameters. Normally application-level...
2018-03-30
537 reads
In many cases, we are required to store configuration values for an application, application functionalities or user-specific parameters. Normally application-level...
2018-03-30
537 reads
Code that writes code it one of the best productivity tips I can give you. And no, I’m not talking...
2018-03-30
551 reads
Thanks for joining me! Target Audience. Database developers, designers and architects. Background. I am lazy efficient, at least am trying to...
2018-03-30
324 reads
DevOps. It’s one of the latest buzz words in many technical communities. Database Doing DevOps This phrase, however, is NOT...
2018-03-30
457 reads
Hey everyone!
Here’s the latest stuff on my new YouTube Channel. Please let me know if these videos are helpful. Also,...
2018-03-30
392 reads
Introduction: -
We live in an era of “Automation”. Planes run on auto pilot mode, cars will soon be auto driven, so why not have auto indexed databases? This article...
2018-03-30
43 reads
Introduction: -
We live in an era of “Automation”. Planes run on auto pilot mode, cars will soon be auto driven, so why not have auto indexed databases? This article...
2018-03-30
431 reads
Sometimes we need a SQL Script which can gives the below information about the databases created on a SQL Server for house keeping purpose: -1) Database Name2) Database ID3)...
2018-03-30
19 reads
Sometimes we need a SQL Script which can gives the below information about the databases created on a SQL Server...
2018-03-30
9,762 reads
It’s early days for thinking about the Summit, but as I wrote the post for yesterday about not submitting I...
2018-03-30
462 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