Grant Fritchey

Grant Fritchey is a SQL Server MVP with over 20 years’ experience in IT including time spent in support and development. Grant has worked with SQL Server since version 6.0 back in 1995. He has developed in VB, VB.Net, C# and Java. Grant has authored books for Apress and Simple-Talk, and joined Red Gate as a Product Advocate in January 2011. Find Grant on Twitter @GFritchey or on his blog as the Scary DBA.

Blog Post

For the Aspiring DBA

Getting started as a data professional is an incredibly daunting task. If you’re not concerned that you’re going to mess...

2013-11-18 (first published: )

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

Alamat BCA KCP Batu Ceper Telp:08218200203

By layanan_Bca88

Telp/Wa 628218200203 Jl. Batu Ceper No.18 A-B, RT.1/RW.2, Kb. Klp., Kecamatan Gambir, Kota Jakarta...

Alamat BCA KCP Kartini Telp:08218200233

By R4nt4u

Telp/Wa 628218200233 Komplek Apartemen Grand Kartini, Ruko. 18, Jl. Kartini Raya No.57, RT.3/RW.2, Kartini,...

Alamat Bank BCA Wisma 46 Telp:08217555651

By m4rt1n4

Telp/Wa 628217555651 Wisma 46 Lantai Dasar, Jln. Jend. Sudirman Kav. 1, RT.5/RW.3, Senayan, Kec....

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