Monitoring Your Databases and Servers and…
You absolutely need to know about the servers you have under management in your estate. You need to know about the databases. Uptime, performance, behaviors, errors, corruption and a...
2019-03-19
22 reads
You absolutely need to know about the servers you have under management in your estate. You need to know about the databases. Uptime, performance, behaviors, errors, corruption and a...
2019-03-19
22 reads
I’m sure by now you’ve heard of the GDPR and some of the large scale data breaches that have occurred within it. If you haven’t heard of the GDPR,...
2019-03-18
19 reads
I’m sure by now you’ve heard of the GDPR and some of the large scale data breaches that have occurred...
2019-03-18
341 reads
I recently shared a story about how I was personally responsible for a development project going off the rails (and...
2019-03-13
433 reads
I recently shared a story about how I was personally responsible for a development project going off the rails (and oh boy, did it go off the rails). It’s...
2019-03-13
10 reads
I’ve been writing a bunch about Azure Data Studio. I’ve also been recording videos on the topic. A comment I...
2019-03-13 (first published: 2019-02-25)
2,385 reads
I’ve shown before how to use the DMVs that read the plan cache as a way to connect the missing indexes suggestions with specific queries, but the other place...
2019-03-11
28 reads
The system_health Extended Events session is incredibly useful. Further, it’s running, by default, in every server you have under management that is 2008 or greater. Things are not the...
2019-03-04
27 reads
The system_health Extended Events session is incredibly useful. Further, it’s running, by default, in every server you have under management...
2019-03-04
504 reads
What happens in Query Store when the database itself is READ_ONLY? Yeah, I don’t know. Let’s find out. READ_ONLY The...
2019-02-27 (first published: 2019-02-11)
2,099 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