Jason Brimhall


Blog Post

Backup Deployed Sessions

Having just completed several segments on the metadata for deployed sessions, it is time to bring all of that information together and see how it can be used -...

2015-10-05

20 reads

Blog Post

SET Operations and Metadata

SET operations in extended events are the extra configurations that can be made to various components. As an example, a target can be configured with certain properties via the...

2015-10-02

8 reads

Blog Post

Session Target Metadata

In the case of the final core component, Targets, the exploration into the metadata can be a little awkward. At least at first. Read on to see how to...

2015-10-01

15 reads

Blog Post

The Extended Event GUI

In the previous article in this series I shared the basics around assembling an XEvent session. The method used in...

2015-10-01 (first published: )

2,655 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