The Toilet Analogy … or Why I Never Recommend Increasing Worker Threads
The Toilet Analogy … or Why I Never Recommend Increasing Worker Threads
Lately I’ve noticed an increasing number of people recommend increasing...
2010-05-07
6,258 reads
The Toilet Analogy … or Why I Never Recommend Increasing Worker Threads
Lately I’ve noticed an increasing number of people recommend increasing...
2010-05-07
6,258 reads
Question: Is Mirroring Supported by MS Access front-end?
The following question was posted on a SQL Server discussion group. My reply...
2010-05-07
2,318 reads
A Few Updates on the MCM: Plaques, Visitors, New Class, and New MCM’s
I just want to pass along a few...
2010-05-01
1,164 reads
Undocumented Capabilities of Extended Event Objects
The extended event objects (objects exposed by an event package) are listed in the system...
2010-04-28
2,181 reads
Looking forward to Optimize for Ad hoc Workloads in Sql Server 2008
One of the features of SQL Server 2008 that...
2010-04-23
3,273 reads
T-SQL Tuesday #005: Smart Card Login Breaks SQL Server Reporting Services 2008
This blog entry is participating in T-SQL Tuesday #005,...
2010-04-13
3,435 reads
2010-04-10
599 reads
5 Random Thoughts on the SQL Server MCM Program
I've had some random thoughts running through my head since I finished...
2010-04-10
3,534 reads
How do I Write a Backup Strategy?
DBA's harp about the need to have backups. The first thing many DBA’s do when they inherit...
2010-04-09
974 reads
Catching Transient CPU Spikes Using SQL Trace If there was one thing I wish everyone who works with SQL Server would...
2010-04-06
4,552 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