Jason Brimhall


Blog Post

Database Dropped

What do you do when a developer comes to you and asks, "Where did the database go? The database was there one minute, and the next it was...

2016-09-09

11 reads

Blog Post

Events By Feature

Within the world of SQL Server there are a few things one can be certain of - things will change. This is true of the features in SQL Server....

2016-08-30

9 reads

Blog Post

Finding the Right Path

What is this gaping hole in the coverage of Extended Events? To be honest, it is not a very complicated topic or very difficult gap to fill. It's just...

2016-08-24

11 reads

Blog Post

T-SQL Tuesday #081: Recap

August 2016 TSQL Tuesday Recap
Related Posts:

T-SQL Tuesday 109: Influence Somebody Invite December 4, 2018

Passion, Challenges, and SQL February 12, 2019

T-SQL Tuesday #102: Giving Back May 8, 2018...

2016-08-18

8 reads

Blog Post

T-SQL Tuesday #081: Getting Sharper

Getting sharper at JSON through a little experimentation.
Related Posts:

Passion, Challenges, and SQL February 12, 2019

T-SQL Tuesday #097: Learning Plans December 18, 2017

T-SQL Tuesday 109: Influence Somebody Invite...

2016-08-16

12 reads

Blogs

T-SQL Tuesday #203: Risk and Reward

By

This is timely, as I’m currently on a boat in the Adriatic taking a...

dataMinds Connect 2026 – Slides & Scripts

By

You can find the slides and SQL scripts for my session “Spice up your...

How to Clear the SSMS Cache (SSMS 21 and Later)

By

How to Clear the SSMS Cache (SSMS 21 and Later) Updated...

Read the latest Blogs

Forums

Using CHOOSE()

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Using CHOOSE()

Re-Seeding a Broken Log Shipping Secondary (Without Touching the Primary)

By LukaMK

Comments posted to this topic are about the item Re-Seeding a Broken Log Shipping...

The DBA is Dead! Long Live the !

By Grant Fritchey

Comments posted to this topic are about the item The DBA is Dead! Long...

Visit the forum

Question of the Day

Using CHOOSE()

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