Throwback Thursday #2: Get Your Speak On!
I hope everyone is having a great Thanksgiving with their families. When you come out of that food coma I...
2013-11-28
1,113 reads
I hope everyone is having a great Thanksgiving with their families. When you come out of that food coma I...
2013-11-28
1,113 reads
SQL Server Rockstar Blogger
I have a quick secret to share with my readers. Ever since I saw Tom Larock’s SQL Server...
2013-11-27
1,190 reads
What Is Throwback Thursday?
One of my hobbies is being a turntablist. In high school I took a job just so...
2013-11-14
834 reads
This year I was honored to be selected by Dell Software to present a ten minute session in their booth...
2013-10-15
1,117 reads
In my last blog post, I showed you how I go about baselining wait statistics. Typically my next step once...
2013-10-15 (first published: 2013-10-10)
4,275 reads
When I start a SQL Server Performance Root Cause Analysis I like to find the top waits and then find...
2013-10-14
1,409 reads
One of the secret weapons in performance tuning with SQL Server is understanding wait statistics. Every time a process (spid)...
2013-10-08
2,001 reads
Have you always wanted to dig into performance tuning but wasn’t sure where to start? If so, check out this Introduction...
2013-09-04 (first published: 2013-08-28)
2,628 reads
I have to give credit where credit is due. Microsoft has definitely made performance tuning easier in SQL Server 2012. Performance...
2013-08-15 (first published: 2013-08-07)
2,587 reads
Last week at TechEd 2013 in New Orleans Microsoft publicly released details about the SQL Server 2014 CTP 1. Here...
2013-06-11
1,823 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