Jason Brimhall


Blog Post

The Virginia Tour 2016

Three days of presentations in Richmond Virginia. From Naked SQL to Wheel of Doom - there is a wide breadth of knowledge to be shared.
Related Posts:

An Experiment with Deadlocks...

2016-03-11

5 reads

Blog Post

SQL Server Locks – Back to Basics

A fundamental component of SQL Server is locking and locks. The locking mechanism helps to control access to resources to help maintain data integrity.
Related Posts:

An Experiment with Deadlocks March...

2016-03-01

53 reads

Blog Post

All about the Change

The use of SQL Audit can be viable to track the changes that may be occurring within your SQL Server - from a settings point of view
Related Posts:

CRM Data...

2016-01-12

11 reads

Blog Post

Alter Event Session

Altering an Extended Event session is not necessarily a difficult task, but it is a very useful ability. Having this basic skill in your wheelhouse can be very positive...

2016-01-08

20 reads

Blog Post

Filtering Logged Data

Over the course of the past couple of articles, I have shown some interesting if not useful functionality in the...

2016-01-07 (first published: )

1,233 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