My Specialty
So I was reading the following blog post by Brent Ozar and I think it finally hit me right between the...
2015-03-24
318 reads
So I was reading the following blog post by Brent Ozar and I think it finally hit me right between the...
2015-03-24
318 reads
As I mentioned in my original post, Exploring Excel 2013 as Microsoft’s BI Client, I will be posting tips regularly...
2015-03-24
716 reads
Have you written a TRY..CATCH statement in T-SQL? I hadn’t done it for most of my career, since the construct...
2015-03-24
1,195 reads
Simple paramaterization occurs when the optimizer determines that a query would benefit from a reusable plan, so it takes the...
2015-04-02 (first published: 2015-03-24)
6,982 reads
You may or may not have noticed it after installing SQL Server 2012: the designer interface in Visual Studio 2010/2012...
2015-03-24
760 reads
After SQL Saturday Pordenone, I’ll keep speaking about DLM (aka ALM on databases) during the following events:
PASS Italian Virtual Chapter, April 14. I’ll demonstrate...
2015-03-24
287 reads
After SQL Saturday Pordenone, I’ll keep speaking about DLM (aka ALM on databases) during the following events:
PASS Italian Virtual Chapter, April 14. I’ll demonstrate...
2015-03-24
551 reads
I haven’t been at this blogging thing an extremely long time, and I certainly haven’t been as consistent as I’ve...
2015-03-24
713 reads
Hello friends,
Many times we face space issues with our database. To resolve this problem SQL Server 2005 provided one more...
2015-03-23
792 reads
At SQLBits I had a number of conversations with a number of people over TSQL Smells, my open source project...
2015-03-23
707 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