PASS Summit: Planting Seeds of Knowledge
On the eve of this year’s PASS Summit, I find myself reflecting on my first Summit in 2012. My employer was generous enough to pay for not only Summit...
2018-11-04
16 reads
On the eve of this year’s PASS Summit, I find myself reflecting on my first Summit in 2012. My employer was generous enough to pay for not only Summit...
2018-11-04
16 reads
Updated 2018-11-04: Expanded test code, renamed the
title of the post so it's clearer.
SMO (SQL Server Management Objects) are the .NET...
2018-11-03
760 reads
It has been a busy year so far. Last March, I did a review, as a Technical Reviewer, for a...
2018-11-02
306 reads
What if you could assess the performance level of your team by asking one simple question? In his recent webinar with Redgate, Gene Kim (@realgenekim) suggests that you can....
2018-11-02
29 reads
I’m excited to have a session accepted to GroupBy, a free online conference targeting the Microsoft data platform community. The conference is sponsored by Brent Ozar Unlimited, and sessions...
2018-11-02
24 reads
There are a limited number of extensions available for Azure Data Studio (ADS), but one that came out early is...
2018-11-16 (first published: 2018-11-02)
1,900 reads
I was disheartened to read the post that shows we have three candidates for three positions this year. Started with...
2018-11-02
339 reads
If you are anything like me, you might have a few different Google accounts that you work with on a...
2018-11-01
57 reads
AdvertisementsPlan Explorer
I recently started using this. Since it was licensed earlier, now it’s free. This is an awesome tool for...
2018-11-01
2,768 reads
One of the features Microsoft wants us to use for Azure SQL Database is Automatic Tuning. Automatic Tuning is a...
2018-11-01
295 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