Database Dropped
What do you do when a developer comes to you and asks, "Where did the database go? The database was there one minute, and the next it was...
2016-09-09
11 reads
What do you do when a developer comes to you and asks, "Where did the database go? The database was there one minute, and the next it was...
2016-09-09
11 reads
I have a fairly large backlog of articles that are in progress or that are planned for my series about...
2016-09-05 (first published: 2016-08-24)
1,495 reads
With the evolution of SQL Server, there is an evolution in Extended Events. New features in SQL Server also means there may be some additional default sessions.
Related Posts:
Changing Default...
2016-09-01
19 reads
Within the world of SQL Server there are a few things one can be certain of - things will change. This is true of the features in SQL Server....
2016-08-30
9 reads
Within the world of SQL Server there are a few things one can be certain of – things will change. This...
2016-08-30
822 reads
What is this gaping hole in the coverage of Extended Events? To be honest, it is not a very complicated topic or very difficult gap to fill. It's just...
2016-08-24
11 reads
August 2016 TSQL Tuesday Recap
Related Posts:
T-SQL Tuesday 109: Influence Somebody Invite December 4, 2018
Passion, Challenges, and SQL February 12, 2019
T-SQL Tuesday #102: Giving Back May 8, 2018...
2016-08-18
8 reads
Sharpen Something
In case you missed it (many did), TSQL Tuesday was a challenging event this month. I invited people to...
2016-08-18
431 reads
Sharpen Something
This month I am the host of the TSQL Tuesday blog party. In the invite, which can be read...
2016-08-16
366 reads
Getting sharper at JSON through a little experimentation.
Related Posts:
Passion, Challenges, and SQL February 12, 2019
T-SQL Tuesday #097: Learning Plans December 18, 2017
T-SQL Tuesday 109: Influence Somebody Invite...
2016-08-16
12 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