Capture the Flag – The Trace Flag
Many people work in a tightly controlled environment. Every change requires a change control form and approval to make a...
2018-12-25 (first published: 2018-12-06)
2,531 reads
Many people work in a tightly controlled environment. Every change requires a change control form and approval to make a...
2018-12-25 (first published: 2018-12-06)
2,531 reads
In coming weekend I will be speaking at SQL Saturday in Ljubljana, Slovenia. I’m extra happy because I do it...
2018-12-06
230 reads
On Monday I wrote about journaling and while any pen will do, I think having a pen dedicated (as it...
2018-12-06
256 reads
You know that old SQL Server you’ve left running the last 5 years and had numerous databases dropped and restored...
2018-12-06
697 reads
I would like to share a link to my Azure SQL Database Stairway series hosted over at SQLServerCentral. As stated...
2018-12-06
467 reads
This post is about some queries and scripts that I use in my daily work on SQL Server. Some of them are self-explanatory, i.e. the name of the query/script...
2018-12-05
93 reads
This post is about some queries and scripts that I use in my daily work on SQL Server. Some of them are self-explanatory, i.e. the name of the query/script...
2018-12-05
470 reads
This post is about some queries and scripts that I use in my daily work on SQL Server. Some of...
2018-12-26 (first published: 2018-12-05)
7,358 reads
A T-SQL approach to solving the 2018 "Advent of Code" programming challenge. This solution includes a recursive case-sensitive string replacement.
The post Advent of Code 2018 – Day 5 (Alchemical...
2018-12-05
40 reads
Advent of Code 2018 – Day 5
As I explained in a recent post, I’m participating in this year’s Advent of Code...
2018-12-05
868 reads
By Steve Jones
This is timely, as I’m currently on a boat in the Adriatic taking a...
You can find the slides and SQL scripts for my session “Spice up your...
By SQLPals
How to Clear the SSMS Cache (SSMS 21 and Later) Updated...
Telp/Wa 628218200203 Gedung Sutrado, Jl. Kenari 2 No.5 Lt. 1, RT.2/RW.3, Kenari, Kec. Senen,...
Telp/Wa 628218200203 Jl. Biak No.44 AB, RT.8/RW.11, Cideng, Kecamatan Gambir, Kota Jakarta Pusat, Daerah...
Telp/Wa 628217555651 Gedung Plaza Bank Index Ground, Jl. M.H. Thamrin No.57 Floor Suite GF-21,...
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