Database Doing DevOps
DevOps. It’s one of the latest buzz words in many technical communities. Database Doing DevOps This phrase, however, is NOT...
2018-03-30
458 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
458 reads
Community.
In the SQL Server community, we are basically one big #sqlfamily. This is a story of how the family helped...
2018-03-23
396 reads
In my experience, there have been occasions where SQL Server Management Studio (SSMS) becomes unresponsive for a length of time....
2018-03-16
819 reads
Several months ago, I was looking at a question posted on ask.sqlservercentral.com. I discovered an answer to a question regarding...
2018-03-12 (first published: 2018-03-02)
5,240 reads
You never know when the idea for a script will make an appearance.
I had to work with composite primary keys...
2018-03-08 (first published: 2018-02-23)
3,587 reads
Several months ago, I was looking at a question posted on ask.sqlservercentral.com. I discovered an answer to a question regarding...
2018-03-02
159 reads
Ok, I’ll admit it. I like scripts that are handy and do things. Especially if the scripts make my life...
2018-03-01 (first published: 2018-02-16)
2,348 reads
Last month in January, I participated in the Idera #sqlchat. This is a monthly chat meeting that is organized by...
2018-02-21 (first published: 2018-02-09)
3,126 reads
Last month in January, I participated in the Idera #sqlchat. This is a monthly chat meeting that is organized by...
2018-02-09
135 reads
In December I wrote about working from home in which I talked about Trello. Trello is a virtual kanban board...
2018-02-02
102 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