Short Circuit Events
I introduced the importance about predicate order previously. I recommend either reading that article for the first time or reading...
2015-10-26
610 reads
I introduced the importance about predicate order previously. I recommend either reading that article for the first time or reading...
2015-10-26
610 reads
The predicate order is critical. Having the wrong order can result in not trapping the desired events. I cover the critical nature of predicates in the aforementioned article. At...
2015-10-26
11 reads
This article will show how to implement an XEvent Session that employs the use of the event_counter target that is used for counting events. IN addition, you will be...
2015-10-23
11 reads
After reading through the articles about the pair_matching target (here) and the article on the histogram target (here), this one is...
2015-10-23
606 reads
In this article I show how to use and configure the histogram target. In addition, I explain how to get to the data trapped into this target. Lastly, I...
2015-10-22
8 reads
In this article I will be taking you into the world of the pair_matching target. The pair_matching target should connote that this target works on matching like events into...
2015-10-21
13 reads
I just covered the topic of matching events from definition on down through highlighting a common use for this type...
2015-10-21
766 reads
In the last article I showed how to discover all of the settings that are available to a particular Target....
2015-10-20
943 reads
In this article I will be taking you into the world of the pair_matching target. The pair_matching target should connote that this target works on matching like events into...
2015-10-20
13 reads
In the last few articles I took you through a progression of working with the event_file target from the most...
2015-10-20 (first published: 2015-10-16)
1,661 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