Microsoft Build event announcements
Another Microsoft event and another bunch of exciting announcements. At the Microsoft Build event this week, the major announcements in the data...
2018-05-11
262 reads
Another Microsoft event and another bunch of exciting announcements. At the Microsoft Build event this week, the major announcements in the data...
2018-05-11
262 reads
Another Microsoft event and another bunch of exciting announcements. At the Microsoft Build event this week, the major announcements in the data...
2018-05-11
823 reads
What Are They
Database snapshots are a readonly point in time version of a database. You can use them for things...
2018-05-11
2,278 reads
The SQL Server ERROR log is the best source to understand what’s wrong with your SQL Server instance, think this...
2018-05-10
139 reads
I was entrusted with a new database for a critical application that was having general performance issue and the CPU...
2018-05-10
1,577 reads
Scenario:
I was at a new client, with their previous and only DBA / DEVELOPER/ MASTER OF ALL of 8 years all...
2018-05-10
10,496 reads
Another post for me that is simple and hopefully serves as an example for people trying to get blogging as...
2018-05-10
473 reads
So far we have discussed various mays to configure MySQL, Environmental Variables, Global Variable, Session Variables, Status Variable and Server...
2018-05-10
219 reads
Mitchell Pearson, Brian Knight and myself will be presenting a full day pre-con as PASS Summit on Digital Storytelling with...
2018-05-10
747 reads
I am working on my dbatools and dbachecks presentations for SQL Saturday Finland, SQLDays, SQL Saturday Cork and SQLGrillen I want...
2018-05-10
376 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