So you want to write a book
I had posted a while back on the process of book writing. It was an attempt to educate while scaring...
2010-12-08
696 reads
I had posted a while back on the process of book writing. It was an attempt to educate while scaring...
2010-12-08
696 reads
Recently, a co-worker practically slammed me up against the wall, exclaiming “You have to check out this new tool, right...
2010-12-06
2,606 reads
I previously mentioned how SQL Server Central was listing ideas for articles, primarily for short, quick, pointed articles that they...
2010-12-02
1,212 reads
Hannah Dustin, Upset about Regression
One of the most important take-aways from David Dewitt’s presentation at the PASS Summit was the...
2010-11-30
1,635 reads
I got my FreeCon. What’s more, I did it in public and didn’t get in trouble.
FreeCon is the brain child...
2010-11-24
1,628 reads
Most people are very aware of the fact that having a foreign key constraint in place on your tables adds...
2010-11-22
1,709 reads
Following in Midnight DBA’s more interesting half new blog fest topic.
My branding? I don’t have a clue. There, I said...
2010-11-19
668 reads
Wouldn’t you like to know why the optimizer stopped tuning the execution plan you’re looking at? It’s actually possible and...
2010-11-18
3,064 reads
The new book is available in a free download from Red Gate. I had a lot of fun working on...
2010-11-16
1,171 reads
After all the conversations at FreeCon last week (more on that later, when I’ve assimilated it better), I finally decided...
2010-11-15
530 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