2020-01-27
248 reads
2020-01-27
248 reads
I wrote a short blog post about the misperception that Profiler was easier than Extended Events when it came to the core concept of “click, connect, BOOM, too much...
2020-01-27
29 reads
If you go through all the stuff I’ve written about Extended Events, you’ll find that I use causality tracking quite a bit. However, I’ve never just talked about what...
2020-01-22 (first published: 2020-01-13)
363 reads
Today, Grant Fritchey talks about the two paths to expertise for database professionals and why it’s hard to really know if someone is an expert.
2020-01-17
450 reads
Grant discusses the need for password managers to help prevent security issues between different accounts.
2020-01-15
284 reads
The first time you see a new execution plan that you’re examining to fix a performance problem, something broken, whatever, you should always start by looking at the first...
2020-01-14 (first published: 2020-01-06)
537 reads
2020-01-11
315 reads
With the end of the year, other things are coming to an end as well. Tomorrow, December 31st, will mark my final day as President of the PASS organization....
2020-01-10 (first published: 2019-12-30)
461 reads
I saw this question on SQL Server Central the other day and had an immediate, visceral reaction. I know why. Now, before I explain my answer, please, let me...
2020-01-01 (first published: 2019-12-16)
1,385 reads
MERRY CHRISTMAS! HAPPY YULETIDE! HAPPY HANUKKUH! Instead of something technical, let’s take a moment to just kick back and enjoy a few great Christmas movies. Now, let’s be clear....
2019-12-23
26 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