New Add-on for SSMS: T-SQL Flex
Do you ever copy query results out of SQL Server Management Studio, paste them into your text editor, and then...
2014-09-11 (first published: 2014-09-08)
10,899 reads
Do you ever copy query results out of SQL Server Management Studio, paste them into your text editor, and then...
2014-09-11 (first published: 2014-09-08)
10,899 reads
I’ve seen this mistake more than once, from DBAs with a middling to fair amount of experience. So it bears repeating....
2014-09-08
929 reads
This is just a short update. I will be speaking at SQL Saturday Kansas City! I really hope to see...
2014-09-08
602 reads
Ah, an interesting week for registrations. We’ve jumped to 426 registered, making my goal of 500 doable. The jump is...
2014-09-08
523 reads
This is part of a series of tips for speakers to make your presentations better.
Please, please, please, learn how to set...
2014-09-08
832 reads
This is the fourth post in the “Parameterization” series. In the previous post I wrote about parameter sniffing, and I...
2014-09-11 (first published: 2014-09-08)
7,143 reads
A short post today to pass on a script I wrote to fulfil a requirement I had.
Which indexes are on...
2014-09-07
539 reads
I spent the last couple days at Flowcon 2014, a conference that is bringing people together to talk about growing...
2014-09-05
789 reads
Photo credit – Travis
Ever go digging through your backyard for dinosaur bones? Maybe not, but it’s worthwhile from time to time...
2014-09-05
740 reads
Lately I spent some time evaluating some monitoring tools for SQL Server and one thing that struck me very negatively...
2014-09-05
466 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