Jason Brimhall


Blog Post

A day in the Stream

Explore the little function called sys.fn_MSxe_read_event_stream and discover just a little bit more of what Extended Events may be doing behind the scenes with the live data viewer.
Related Posts:

Quick...

2016-01-05

31 reads

Blog Post

Hidden GUI Gems

I have a few gems that are available to you in the GUI. These gems should help solidify your understanding of the tools available through the GUI to help...

2016-01-02

7 reads

Blog Post

Filtering Logged Data

Explore how to customize the view of the GUI for working with XEvent Log files or XEL files. This further customization does include working with filters.
Related Posts:

Get a List...

2016-01-01

33 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