Advent of Code 2017 Day 4–#SQLNewBlogger
Another post for me that is simple and hopefully serves as an example for people trying to get blogging as...
2018-01-18
737 reads
Another post for me that is simple and hopefully serves as an example for people trying to get blogging as...
2018-01-18
737 reads
A quick way to have your day turned upside down and rip your gut out with nerves and anxiety is to come in one day to find that users...
2018-01-18
17 reads
A quick way to have your day turned upside down and rip your gut out with nerves and anxiety is...
2018-01-18
1,015 reads
I was going through my demo for the South Coast User Group meeting tonight and decided to add some details...
2018-01-18
388 reads
Warning: If during reading this post, you feel like a lot of bells started ringing – I might have written about...
2018-01-18
432 reads
@adedba Adrian Buckman has been working hard and has put all of our scripts up on Github https://github.com/SQLUndercover/UndercoverToolbox
2018-01-18
373 reads
Have you ever wished for a visual indicator that you are connected to a production instance of SQL Server? Well,...
2018-01-17
154 reads
Have you ever wished for a visual indicator that you are connected to a production instance of SQL Server? Well,...
2018-01-17
390 reads
Dynamic management views (DMVs) and dynamic management functions (DMFs) are system views and system functions that return metadata of the system...
2018-01-17
907 reads
By now you have probably seen the news about a major flaw in the design of CPUs from all major...
2018-01-17
340 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