T-SQL Tuesday 109: Influence Somebody Invite
Building on the work of these three fine individuals, here comes the difficult task. You have been the benefactor of some awesome help from somebody else. You even wrote...
2018-12-04
9 reads
Building on the work of these three fine individuals, here comes the difficult task. You have been the benefactor of some awesome help from somebody else. You even wrote...
2018-12-04
9 reads
How have you impacted somebody in the community?
It has now been 28 months since the last time I hosted a...
2018-12-04
230 reads
I explore the question of if it is possible to reboot the server from within SQL Server or even simply shut down the entire server. Well, you can certainly...
2018-12-03
20 reads
One of the really super cool things about the SQL community is the frequent opportunity one could have to get involved.
One of my favorite methods of getting involved is...
2018-11-30
12 reads
It’s a Wonderful Life
One of the really super cool things about the SQL community is the frequent opportunity one could...
2018-11-30
266 reads
Working as a Data Professional
An old friend Malathi Mahadevan (b | t) asked me one day if I would be interested...
2018-11-29
252 reads
Not only will you encounter some interesting stories, but I believe you will also encounter some interesting insight into some of the contributors for this book: Data Professionals at...
2018-11-29
11 reads
When it comes to characteristics of an MVP, the two groups (geek and jock) are no longer at the opposite ends of the spectrum. Rather, they are very similar...
2018-11-28
12 reads
How to be an MVP in LIFE
One of the fun things about being involved in the community is the opportunity...
2018-11-28
303 reads
As a Database Administrator, something that should be part of your database audit is monitoring the growth of files. That...
2018-11-27
564 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