A Busy Summit
I’m only at the PASS Summit for two days, but they will be busy. If you’re at the event and...
2018-11-07
248 reads
I’m only at the PASS Summit for two days, but they will be busy. If you’re at the event and...
2018-11-07
248 reads
Cannot use the special principal 'dbo'. This error message can be misleading. This article will take you on a journey of common mis-steps along with the appropriate fix for...
2018-11-07
461 reads
I recently had a client call me out of the blue because he happened to be getting an error while...
2018-11-21 (first published: 2018-11-07)
2,583 reads
Modern businesses are data-driven. Many business leaders will tell you it is the “lifeblood” of their company. Good data helps us provide outstanding service to our customers, identify potential...
2018-11-07
41 reads
Modern businesses are data-driven. Many business leaders will tell you it is the “lifeblood” of their company. Good data helps...
2018-11-07
287 reads
It’s the start of Summit for many of us (not me, sorry) and it seemed like a good time to...
2018-11-07
233 reads
Scaling up or down an Azure SQL Database is a very common task. Whilst common it is also very easy...
2018-11-07
299 reads
It was very long and hard-working week (8.10-12.10). I was with my data-geek #SQLfamily and friends at the (SQL) Data...
2018-11-07
85 reads
Was honored to speak to fellow User Group leaders at the PASS Summit User Group leader meeting on Tuesday. Here's detail and links to some of the things I...
2018-11-07
21 reads
SQL Sentry is a pretty cool monitoring system but there's a downside to having so many knobs to turn:
it's next...
2018-11-07
271 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