UNDERCOVER TOOLBOX: sp_WhatsMyAG
Here’s a quick one for you. If you happen to be managing SQL Servers with a large number of databases...
2018-03-07
363 reads
Here’s a quick one for you. If you happen to be managing SQL Servers with a large number of databases...
2018-03-07
363 reads
One of the most important parts of continuing learning as a DBA (or probably an IT Professional) is reading blogs. ...
2018-03-07
381 reads
Debugging is a life skill. Yes, the term comes from IT (literally removing a bug from a computer believe it...
2018-03-19 (first published: 2018-03-07)
2,066 reads
SQL Server Management Studio (SSMS) 2016 has a handy new feature to View Live Query Statistics. This feature also works...
2018-03-07
182 reads
This week at MVP Summit I got to talk with a friend who loves profiler. We were talking about capturing workloads and doing analysis on them. T-SQL or other...
2018-03-06
17 reads
This week at MVP Summit I got to talk with a friend who loves profiler. We were talking about capturing...
2018-03-06
298 reads
Today is the day that Azure SQL Database Managed Instance is available for the world to explore. Private preview means...
2018-03-06
306 reads
One sale today, my Getting Started with SQL Server 2016 Administration video. You can get this for $10 today, and...
2018-03-06
343 reads
I’ve been playing with Data Masker for SQL Server v6 and it’s an interesting product. I like the way it...
2018-03-06
388 reads
Disclaimer: I’m one of the Technical Reviewers for this book.
With the rising demand for cloud computing and wide adaptation of...
2018-03-19 (first published: 2018-03-06)
2,715 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