Guest Blog
I was given the opportunity to put together a guest blog post for the MVP blog. I did a little...
2012-06-05
945 reads
I was given the opportunity to put together a guest blog post for the MVP blog. I did a little...
2012-06-05
945 reads
This whole concept of the clustered index as a foundational structure within SQL Server is just plain nuts. Sure, I...
2012-05-31
2,380 reads
Today we have a guest editorial from Grant Fritchey that might surprise you. Today Grant talks about clustered indexes in your tables.
2012-05-31
984 reads
A virus found it’s way on to my system through a trojan horse, past all the security & anti-virus software. I...
2012-05-28
1,042 reads
In a recent discussion it was suggested to me that not only is dynamic T-SQL useful for things like catch-all...
2012-05-21
1,280 reads
I’m happy to say that for most of you out there, the answer to this question is “no.” That’s as...
2012-05-16
833 reads
The short answer is, of course, none of them, but testing is the only way to be sure.
I was asked,...
2012-05-11 (first published: 2012-05-07)
5,420 reads
If you make changes to the settings of a database, it can cause the procedure cache to be cleared. Microsoft...
2012-04-30
1,792 reads
Here’s the situation. We’re absolutely falling down as men and professionals. Ladies, feel free to read on and comment, but...
2012-04-27 (first published: 2012-04-23)
2,626 reads
I just found a little bug in AlwaysOn. It’s actually not that big a deal, but it’s interesting. In a...
2012-04-26
1,253 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