Execution Plan Shortcoming in Extended Events
I use Extended Events almost exclusively for capturing query metrics. They are the most consistent and lowest cost mechanism for...
2018-04-26 (first published: 2018-04-16)
1,725 reads
I use Extended Events almost exclusively for capturing query metrics. They are the most consistent and lowest cost mechanism for...
2018-04-26 (first published: 2018-04-16)
1,725 reads
Let’s face it, the core of a presentation is you. Your knowledge and your ability to share that knowledge through...
2018-04-23
306 reads
I’ve said it before, but it bears repeating, there is no cause for any kind of panic when it comes...
2018-04-20 (first published: 2018-04-09)
3,456 reads
Grant talks about the challenges of helping people in online forums and getting them to learn rather than grab the first solution.
2018-04-16
157 reads
With all the noise about the upcoming enforcement of GDPR, I know that people are starting to focus more on...
2018-04-11
450 reads
I recently found myself rereading a very old blog post of mine, from the very beginning of this blog, discussing...
2018-04-02
283 reads
Hey everyone!
Here’s the latest stuff on my new YouTube Channel. Please let me know if these videos are helpful. Also,...
2018-03-30
393 reads
I’ve been reading the General Data Protection Regulation (GDPR) and discussing the ramifications of the beginning of enforcement with lots...
2018-03-28 (first published: 2018-03-19)
2,782 reads
Query Store has mechanisms for automatically cleaning your data. It is possible to cause them to break down. While presenting...
2018-03-26
637 reads
All the execution plans are estimated plans. All of them. There fundamentally isn’t any such thing as an “Actual” plan.
Where...
2018-03-14 (first published: 2018-03-05)
1,828 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