Easily Splatting PowerShell with VS Code
So I always like to show splatting PowerShell commands when I am presenting sessions or workshops and realised that I...
2018-03-11
1,307 reads
So I always like to show splatting PowerShell commands when I am presenting sessions or workshops and realised that I...
2018-03-11
1,307 reads
In this module you will learn how to use the Mapbox Visual. The Mapbox Visual allows you to visualize geographical...
2018-03-20 (first published: 2018-03-09)
2,671 reads
Accessibility is often overlooked or ignored when it comes to reporting and data visualization. I think there are two reasons...
2018-03-09
1,061 reads
One of the recommended methods to trap payload data in an XE session is via the use of the event_file target. Sending data to a file has numerous benefits...
2018-03-09
52 reads
It should come as no surprise that I write a lot of articles about Extended Events (XE). This happens to...
2018-03-21 (first published: 2018-03-09)
5,945 reads
I just had an interesting case of performance tuning: a query with multiple predicates on a very large table. Something...
2018-03-21 (first published: 2018-03-09)
4,160 reads
Of late, there’s been a lot of noise around the term, GDPR. Chances are, some of us even had to...
2018-03-09
401 reads
UPDATE: The blog post doesn’t make this exactly clear, but fiddling around with the report database to get the upgrade...
2018-03-20 (first published: 2018-03-08)
3,927 reads
Microsoft has announced the public preview of Azure SQL Database Managed Instance. I blogged about this before. This will lead...
2018-03-08
142 reads
Microsoft has announced the public preview of Azure SQL Database Managed Instance. I blogged about this before. This will lead...
2018-03-08
1,226 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