Sometimes a change is as good as a break : T-SQL Tuesday #134
James McGillivray (blog|twitter) wants us to give him a break. Well. Actually I guess he wants to know how we ... Continue reading
2021-01-12
149 reads
James McGillivray (blog|twitter) wants us to give him a break. Well. Actually I guess he wants to know how we ... Continue reading
2021-01-12
149 reads
It’s a brand new year and hopefully it will be better than last year. While that may be particularly true ... Continue reading
2021-01-11 (first published: 2021-01-05)
371 reads
It’s a brand new year and hopefully it will be better than last year. While that may be particularly true ... Continue reading
2021-01-05
24 reads
2020 was a rough year. We’ve had friends and family leave us. Jobs lost. Health scares a plenty and that’s ... Continue reading
2020-12-31
71 reads
Christmas. Depending on where you live it’s a big deal even if you aren’t Christian. It pervades almost every aspect ... Continue reading
2020-12-03
90 reads
It’s been a while since I worked with compression and the other day I needed to check which of my ... Continue reading
2020-11-27 (first published: 2020-11-17)
519 reads
Note: This is not exactly a dyanmic linked server. It just gets dropped and recreated in a loop. I recently ... Continue reading
2020-11-23 (first published: 2020-11-12)
345 reads
Taiob Ali (blog|twitter) is our host for TSQL Tuesday this month and he’d like us to talk about how our ... Continue reading
2020-11-13 (first published: 2020-11-10)
274 reads
Creating a user is simple right? Yes and no. First of all, at least in SSMS it appears you don’t ... Continue reading
2020-11-19 (first published: 2020-11-05)
368 reads
If you ask any senior IT person What is the most important tool you have? there is a decent chance that ... Continue reading
2020-11-10 (first published: 2020-11-03)
595 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