Epic Life Quest – looking back
This will be my last post for the year. In this am going to look back on goals I set...
2018-12-03
736 reads
This will be my last post for the year. In this am going to look back on goals I set...
2018-12-03
736 reads
As you’re enjoying the festivities this month, spare a thought for your database administrators and IT teams. It’s one of the busiest and most stressful times of the year...
2018-12-03
30 reads
As you’re enjoying the festivities this month, spare a thought for your database administrators and IT teams. It’s one of...
2018-12-03
372 reads
There was a question in the #dbatools slack channel
Getting dbatools
dbatools enables you to administer SQL Server with PowerShell. To get...
2018-12-03
350 reads
Since SQL 2012 some really awesome new technologies have been introduced into the engine that are massively underused. Everyone is...
2018-12-19 (first published: 2018-12-03)
2,294 reads
I’m proud to announce that I will be speaking at this months We Speak Linux Webinar. Each month We Speak Linux brings cross platform training to the Windows world....
2018-12-02
15 reads
I’m proud to announce that I will be speaking at this months We Speak Linux Webinar. Each month We Speak...
2018-12-02
185 reads
As I’m sure you’re aware, the career path for a SQL Server DBA is a wonderful journey of growing your catalog of knowledge through unexpected lessons. For example: Did...
2018-12-02
11 reads
As I’m sure you’re aware, the career path for a SQL Server DBA is a wonderful journey of growing your catalog of knowledge through unexpected lessons. For example: Did...
2018-12-02
14 reads
Hello folks, This is a quick roundup of Internet posts from last week. Have a good reading! Create and configure...
2018-12-02
211 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