I've been chosen to speak at SQL Saturday Guatemala
I'm thrilled to announce that one of my proposals has been chosen to be presented in Guatemala's SQL Saturday that...
2018-01-19
142 reads
I'm thrilled to announce that one of my proposals has been chosen to be presented in Guatemala's SQL Saturday that...
2018-01-19
142 reads
This is day 4 of the Advent of Code 2017. If you want to read about the puzzles, start with...
2018-01-19
433 reads
I really like the dbatools project. This is a series of PowerShell cmdlets that are built by the community and...
2018-01-19
503 reads
With the announcement of the recent security issues, namely Meltdown and Spectre, we at Denny Cherry & Associates Consulting have been...
2018-01-19
530 reads
I have written previously (here)about how to tell which database files have free space in them when your drive starts...
2018-01-19
3,757 reads
REPAIR_ALLOW_DATA_LOSS is the repair level, which is recommended by DBCC CHECKDB when the database is found in a corrupted state.SQL...
2018-01-19
3,257 reads
It’s been absolutely freezing here in Dublin this week. Been spending pretty much all time wrapped up indoors reading…
Discussing PASS...
2018-01-19
314 reads
In the human history, there was a huge drive (such an ambiguous meaning here) to get faster.
Maybe within our DNA...
2018-01-19
321 reads
You may have noticed that in many places in SSMS, you can create a new item and SSMS opens up...
2018-01-18
84 reads
You may have noticed that in many places in SSMS, you can create a new item and SSMS opens up...
2018-01-18
289 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