There Is a Magic Button, a Rant
OK guys. I think it’s way past time. A bunch of us have been keeping a secret from the rest...
2017-08-01
496 reads
OK guys. I think it’s way past time. A bunch of us have been keeping a secret from the rest...
2017-08-01
496 reads
OK guys. I think it’s way past time. A bunch of us have been keeping a secret from the rest...
2017-08-01
226 reads
I read a lot of self-help and improvement information. I’m always trying to hack my brain or my attitude to...
2017-07-31
354 reads
Don’t let the ease of creating databases lull you into a false sense of security. They actually can be very...
2017-07-31 (first published: 2017-07-17)
2,299 reads
The whole idea behind databases is to store information, data, in order to look at it later. The place where...
2017-07-24
541 reads
If you keep your head up and look around you’ll see the choices people make all the time. I saw...
2017-07-21 (first published: 2017-07-10)
1,980 reads
I was given the opportunity to do a little online interview. It’s primarily about promotion, but I thought I’d share...
2017-07-18
308 reads
I love Entity Framework. I also like (not love) nHibernate. That’s right, as a DBA and data professional, I’m telling...
2017-07-17 (first published: 2017-07-05)
2,785 reads
SQL Server provides multiple ways to perform most functions. In order to maximize your understanding of how SQL Server works...
2017-07-06 (first published: 2017-06-26)
2,006 reads
I want to take a moment to thank a few people for being amazing.
First up, Thomas LaRock is wrapping up...
2017-07-06
334 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