T-SQL Tuesday #88: My Top WTF Moments
Welcome to T-SQL Tuesday #88 being hosted this month by Kennie Nybo Pontoppidan (blog|@KennieNP). This month’s topic is the “daily...
2017-03-14
605 reads
Welcome to T-SQL Tuesday #88 being hosted this month by Kennie Nybo Pontoppidan (blog|@KennieNP). This month’s topic is the “daily...
2017-03-14
605 reads
One of the problems with whitepapers is that they get out of date pretty quickly. It’s important to update them...
2017-03-13
548 reads
From time to time, I see posts in forums from people complaining about how much some consultants charge. A really...
2017-02-17
621 reads
Welcome to T-SQL Tuesday #87 being hosted this month by Matt Gordon (blog|@sqlatspeed). This month’s topic is “Fixing Old Problems...
2017-02-14
697 reads
One of the other DBAs I work with noticed a warning message that was flooding the log files on one...
2017-01-30
1,893 reads
If you already know about Automatic Soft-NUMA in SQL Server 2016, then you probably already read the blog post SQL...
2017-01-04 (first published: 2016-12-30)
2,255 reads
Welcome to T-SQL Tuesday #85 being hosted this month by Kenneth Fisher (blog|@SQLStudent144). This month’s topic is “Backup and Recovery”....
2016-12-13
731 reads
Welcome to T-SQL Tuesday #85 being hosted this month by Kenneth Fisher (blog|@SQLStudent144). This month’s topic is “Backup and Recovery”....
2016-12-13
785 reads
Welcome to T-SQL Tuesday #83 being hosted this month by Andy Mallon (blog|@AMTwo). This month’s topic is “We’re still dealing...
2016-10-11
722 reads
It’s time for T-SQL Tuesday again, and this month’s host is fellow Certified Master and Data Platform MVP Jason Brimhall...
2016-08-09
680 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