Blog Post

MDX Root Function

This week I discovered an incredibly useful MDX function, the function is called Root.  Full documentation can be found here. In the past, I have encountered scenarios where I...

2014-01-05

28 reads

Blog Post

MDX Root Function

This week I discovered an incredibly useful MDX function, the function is called Root.  Full documentation can be found here. In the past, I have encountered scenarios where I...

2014-01-05

64 reads

Blog Post

MDX Root Function

This week I discovered an incredibly useful MDX function, the function is called Root.  Full documentation can be found here....

2014-01-08 (first published: )

2,197 reads

Blog Post

Day 11 – Purging syspolicy

This is the eleventh installment in the 12 day series for SQL tidbits during this holiday season. Previous articles in this mini-series on quick tidbits: SQL Sat LV announcement...

2014-01-04

57 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

Risk Vs Reward, The never ending ROI discussion.

By Pat Wright

Comments posted to this topic are about the item Risk Vs Reward, The never...

Alamat BCA KCP Cideng Timur Telp:0821-8200-203

By layanan_Bca88

Telp/Wa 628218200203 Jl. Cideng Timur No.11 F, RT.5/RW.4, Petojo Utara, Kecamatan Gambir, Kota Jakarta...

Alamat BCA KCP KEM Tower Telp:0821-8200-233

By R4nt4u

Telp/Wa 628218200233 Kem Tower, Jl. Landas Pacu Barat No.Kav 2 Blok B, RW.10, Gn....

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