Know How to Recover SQL Server Database Without Backup
Microsoft SQL Server has widely used database management system for storing and retrieving data. It stores its files in MDF,...
2018-01-24
600 reads
Microsoft SQL Server has widely used database management system for storing and retrieving data. It stores its files in MDF,...
2018-01-24
600 reads
I’ve been playing around with SQL Server running in Kubernetes in Azure Container Services (AKS) for a while now and...
2018-02-01 (first published: 2018-01-24)
1,490 reads
In this module you will learn how to use the Funnel with Source Custom Visual by MAQ Software. The Funnel...
2018-01-30 (first published: 2018-01-24)
1,260 reads
What is GDPR, everyone’s (current) favorite acronym? It stands for “General Data Protection Regulation” and is an act / law / set...
2018-02-05 (first published: 2018-01-23)
2,415 reads
There are many editing items in SSMS that makes formatting and navigating your code easier than ever. Most of these...
2018-01-23
192 reads
There are many editing items in SSMS that makes formatting and navigating your code easier than ever. Most of these...
2018-01-23
322 reads
Not sure who this is that is attempting to hack into my blog so desperately, but seriously, time for a...
2018-01-23
305 reads
AWS EC2 Linux AMI with pyodbc, psqlODBC, Microsoft ODBC Drivers Context: Using pyodbc within a small python application to pull tracking data from an Azure SQL Server DB, do...
2018-01-23
90 reads
One of the main DBA's duties is to guarantee that SQL Server instances are up-to-date in terms of patches (Service...
2018-01-23
757 reads
SQL Prompt from Redgate Software is one of the tools that I cannot live without. Well, that’s probably an exaggeration...
2018-02-02 (first published: 2018-01-23)
3,303 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