Parameterization Part 5: Two Common Mistakes
This is the fifth post in my Parameterization series. In previous posts I wrote about parameter sniffing and when it is...
2014-09-23 (first published: 2014-09-20)
9,006 reads
This is the fifth post in my Parameterization series. In previous posts I wrote about parameter sniffing and when it is...
2014-09-23 (first published: 2014-09-20)
9,006 reads
Ever since SQLSaturday #1 our venue has been Seminole State College (Seminole Community College back then), provided graciously and perhaps...
2014-09-19
766 reads
I spent a few days at DevConnections this week and really enjoyed the conference. The location was Aria in Las...
2014-09-19
775 reads
Photo credit – Jenn and Tony Bot
Sometimes old stuff is just as cool as new stuff. Over the past few years,...
2014-09-19
749 reads
If I had a favorite kind of politician, it would be the kind that, when asked a question, sighs tiredly,...
2014-09-19
566 reads
I am running for the PASS Board. You can read more about what I’ve posted and what others have to...
2014-09-19
536 reads
The Enterprise Policy Management Framework (EPMF) team is proud to announce the updated release of “Enterprise Policy Management Framework 4.0 for project EPMFramework. This is a major release with...
2014-09-19
15 reads
The Enterprise Policy Management Framework (EPMF) team is proud to announce the updated release of “Enterprise Policy Management Framework 4.0 for project EPMFramework. This is a major release with...
2014-09-19
8 reads
The Enterprise Policy Management Framework (EPMF) team is proud to announce the updated release of “Enterprise Policy Management Framework 4.0...
2014-09-19
1,177 reads
It’s Friday, time to look back at the most popular RealSQLGuy posts of the week. Because it’s Friday and you’re...
2014-09-19
349 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