Fill Out The State of the Database Landscape Survey and Maybe Win
If you’re like me, you sometimes wonder how different other environments are from the one I work in. Well, the ones I used to work in. These days I...
2023-08-15
23 reads
If you’re like me, you sometimes wonder how different other environments are from the one I work in. Well, the ones I used to work in. These days I...
2023-08-15
23 reads
2023-08-14
431 reads
Communication can be challenging when we don't work closely with others. Steve draws a comparison with a popular children's show in the US.
2023-08-14
164 reads
I had to test something for a customer, and as a part of this there as a need to have a different default schema for a user. I wrote...
2023-08-14 (first published: 2023-07-26)
397 reads
aubadoir – n. the outworldly atmosphere just before 5 am, when the bleary melodrama of an extremely late night becomes awkwardly conflated with the industrious flourescence of a very...
2023-08-11
236 reads
A fun contest from Steve asks you to design a system that tracks travels for a fictitious business.
2023-08-11
1,754 reads
2023-08-11
463 reads
On Aug 22, 2023, I’m co-hosting a webinar with Anderson Rangel, Redgate Solution Engineer in Brisbane. You can register here for the 11am AEST webinar. No, I’m not going...
2023-08-11
37 reads
Today Steve asks the question about what you do outside of work to advance your career.
2023-08-11
136 reads
Years ago Redgate did some traveling events under the SQL in the City brand. These were a lot of fun and kind of amazing. One of the longer tours...
2023-08-10
41 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