How to Find Objects that Contain a Certain String in SQL Server
Let’s say you remember a piece of code you need to optimize or take a look at, but you don’t...
2015-05-13
630 reads
Let’s say you remember a piece of code you need to optimize or take a look at, but you don’t...
2015-05-13
630 reads
This post is part of a series of posts on ASP.NET 5 the series index can be found here ASP.NET...
2015-05-13
60 reads
Recently, I was able to help SimpliVity work to develop a reference architecture document for running resource-intensive SQL Server virtual machines on...
2015-05-13
1,235 reads
If a user is going to call me about problem, I’d much rather know about it ahead of time. In...
2015-05-21 (first published: 2015-05-12)
4,904 reads
Welcome to the fabulous world of blog parties, SQL Server and what has been the longest running SQL Server related meme in the blogosphere – TSQLTuesday. This month we...
2015-05-12
9 reads
Welcome to the fabulous world of blog parties, SQL Server and what has been the longest running SQL Server related...
2015-05-12
559 reads
Cathrine Wilhelmsen (b|t) is hosting this month’s T-SQL Tuesday, and the topic she chose is monitoring. All of us, whether...
2015-05-12
1,125 reads
Just heard
that today was T-SQL Tuesday #66! Well,
I knew it was Tuesday, and T-SQL comes into play once a month,...
2015-05-12
2,196 reads
If you’ve read my blog or attended one of my presentations before, you almost certainly know that I’m a huge...
2015-05-21 (first published: 2015-05-12)
4,374 reads
[read this post on Mr. Fox SQL blog] Continuing on with my Partitioning post series, this is part 2. The partitioning includes several major components of work (and can be linked...
2015-05-12
7 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