Another Query to Help Find the Right Event
Finding the right event or combination of events to monitor may seem like quite a daunting task with so many...
2016-07-26 (first published: 2016-07-21)
1,609 reads
Finding the right event or combination of events to monitor may seem like quite a daunting task with so many...
2016-07-26 (first published: 2016-07-21)
1,609 reads
Quick Flashback
Back in late December of 2015, a challenge of sorts was issued by Tim Ford (twitter) to write a...
2016-07-25 (first published: 2016-07-14)
3,346 reads
I have been sitting on this article for a while now. I have been tossing around some
thoughts and finally...
2016-07-25
562 reads
When you feel you deserve to be an MVP, are you prepared to do more work? Being an MVP is not just an award - it is a commitment...
2016-07-25
7 reads
Finding the right event or combination of events to monitor may seem like quite a daunting task with so many events to explore and (frequently) too little familiarity with...
2016-07-21
9 reads
When working with Extended Events, there are times when a little more information is, well, helpful. You know you want to use extended events to try and monitor...
2016-07-19
12 reads
Enjoy this article re-publication from my original work at SQL Solutions Group.
When working with Extended Events, there are times when...
2016-07-19
672 reads
Of all the fundamental concepts within SQL Server, this one drives me a bit batty from time to time. Think about that statement for just a moment.
Related Posts:
T-SQL Tuesday...
2016-07-14
19 reads
SQL Server 2016 has come with a ton of cool features, bells, whistles and well cool stuff (yes redundant). That aside, what are some of the really cool features...
2016-07-13
7 reads
Happy Belated Birthday
The monthly Data Professionals blog party has come and gone. It happens the second Tuesday of every month...
2016-07-13
524 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