T-SQL Tuesday #106 – Trigger Headaches or Happiness
Since I took over the T-SQL Tuesday a few months ago, I decided I ought to host again. Especially since...
2018-09-04
288 reads
Since I took over the T-SQL Tuesday a few months ago, I decided I ought to host again. Especially since...
2018-09-04
288 reads
As i was discussing about MongoDB in my earlier blog, on NOSQL ACID stands for Atomic, Consistent, Isolation, and Durable...
2018-09-04
231 reads
The call for applications for the Nominating Committee closes on Sep 10th. If you care about the future of PASS...
2018-09-04
274 reads
Almost all the applications we use have a lot of options. And, sometimes we even stumble across them by accident. Who’s ever heard something like “Normal user don’t even...
2018-09-04
24 reads
Intro
I would like to start a miniseries of blogs where I try to summarize lessons learned from large data loading...
2018-09-03
90 reads
(Be sure to checkout the FREE SQLpassion Performance Tuning Training Plan - you get a weekly email packed with all the...
2018-09-12 (first published: 2018-09-03)
2,940 reads
Let’s be really clear, Redgate makes ingeniously simple tools. That’s a fact. Nothing has changed. However, if you really want...
2018-09-03
294 reads
SQL in the City Streamed is coming up this week! This is an awesome FREE online event, and it’s all about learning new things and getting inspired. Join us...
2018-09-03
21 reads
In the very first SQL Homework post you were asked to take a backup. In fact it asked you to...
2018-09-03
811 reads
At first I was nervous but then I realized it was me triggering “Someone has logged on to your server ...
2018-09-03
849 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...
Comments posted to this topic are about the item Using CHOOSE()
Comments posted to this topic are about the item Re-Seeding a Broken Log Shipping...
Comments posted to this topic are about the item The DBA is Dead! Long...
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