Log Files from Different Sources
While working with Extended Events, or with any sort of logging or tracing utility, it becomes critical to consume the data from disparate sources or even to consume the...
2015-12-30
16 reads
While working with Extended Events, or with any sort of logging or tracing utility, it becomes critical to consume the data from disparate sources or even to consume the...
2015-12-30
16 reads
The last few articles covered the pair_matching target and some uses and details that go along with it. For a...
2015-11-03 (first published: 2015-10-22)
1,884 reads
With the proximity to Halloween, it's not hard (knowing me) to figure out why I originally decided to terminate this series on the Eve of Halloween day. Join me...
2015-10-30
9 reads
Halloween is a great time of year. It is unfortunate that it is just one day of the year. That...
2015-10-30
1,024 reads
So I have blasted through a lot of technical articles about Extended Events. There is a lot of groundwork that...
2015-10-29
1,106 reads
The focus of this article will be to introduce the default sessions deployed with SQL Server. Some of these are internal and "private" while others are more "public" and...
2015-10-29
48 reads
What hasn't received any TLC is Extended Events from the Azure SQL Database perspective. You may be wondering why it matters since I just said that Extended Events is...
2015-10-28
11 reads
So far I have strictly focused on Extended Events for SQL Server installations. This means I have been looking at Extended...
2015-10-28
764 reads
The premise of the article today is to get a little exposure to some of the internals that may cause a bit of curiosity for you. I will share...
2015-10-27
7 reads
For me, some of the most fun stuff with SQL Server is diving deep into the internals. Diving into the...
2015-10-27
600 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