Detecting Encryption
I ran across an article recently from MSSQLTips by my friend, Brian Kelley. It talks about the ways you can...
2015-02-11
1,364 reads
I ran across an article recently from MSSQLTips by my friend, Brian Kelley. It talks about the ways you can...
2015-02-11
1,364 reads
Backing up databases is one of the most important jobs of a DBA. If your data is not safe, your...
2015-02-23 (first published: 2015-02-11)
9,154 reads
Advanced Analytics, or Business Analytics, refers to future-oriented analysis that can be used to help drive changes and improvements in...
2015-02-11
1,587 reads
Often I’m asked what is the best practice for a single SQL Server installation. Well, that is a tricky questions and the answer is it always depends. Let’s discuss...
2015-02-11
17 reads
Often I’m asked what is the best practice for a single SQL Server installation. Well, that is a tricky questions...
2015-02-11
494 reads
Welcome to SQLSaturday #380 - Precons Announced!
In addition to the extraordinary extravaganza SQLSaturday NYC event we have planned for Saturday, May...
2015-02-20 (first published: 2015-02-11)
6,029 reads
Today we have another installment in what is known as TSQL Tuesday. This month we have an invitation and topic given to us by the infamous Kenneth Fisher (...
2015-02-10
9 reads
Today we have another installment in what is known as TSQL Tuesday. This month we have an invitation and topic...
2015-02-23 (first published: 2015-02-10)
6,022 reads
As I mentioned in my original post, Exploring Excel 2013 as Microsoft’s BI Client, I will be posting tips regularly...
2015-02-20 (first published: 2015-02-10)
7,181 reads
It’s T-SQL Tuesday time again and this month we look at security. Kenneth Fisher has chosen this as his topic...
2015-02-19 (first published: 2015-02-10)
7,004 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