The 5 Scariest Moments for a SQL Server Developer
While families and friends are scaring each other this Halloween week with stories of ghosts and ghouls, I thought it’d...
2018-11-08 (first published: 2018-10-30)
4,996 reads
While families and friends are scaring each other this Halloween week with stories of ghosts and ghouls, I thought it’d...
2018-11-08 (first published: 2018-10-30)
4,996 reads
Watch this week's video on YouTube
While families and friends are scaring each other this Halloween week with stories of ghosts and ghouls, I thought it'd be way scarier to talk...
2018-10-30
11 reads
Watch this week's video on YouTube
While families and friends are scaring each other this Halloween week with stories of ghosts and ghouls, I thought it'd be way scarier to talk...
2018-10-30
10 reads
Over the past few weeks I wrote a 3-part series on how to configure email alerts based on Perfmon Counters,...
2018-10-30
100 reads
(2018-Oct-29) There are only a few sentences in the official Microsoft web page that describe newly introduced activity task (Append Variable)...
2018-11-07 (first published: 2018-10-29)
12,603 reads
As DBA’s we are sometimes put in a rock and hard place when it comes to database performance. This situation...
2018-11-06 (first published: 2018-10-29)
4,550 reads
Introduction
In my last post. Step-by-Step: How to Trigger an Email Alert from a Windows Event that Includes the Event Details using...
2018-10-29
2,777 reads
I was recently asked if we are going to see performance differences if we explicitly drop temporary tables. I couldn’t...
2018-11-07 (first published: 2018-10-29)
3,998 reads
I’m always on the looking our excellent training, especially free training. Tim Mitchell, Microsoft Data Platform MVP, (twitter | website) has...
2018-10-29
278 reads
There is a fear that almost every blogger has to overcome. I’ll be honest, it pops up almost every time...
2018-10-29
322 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