UNDERCOVER TOOLBOX: Get Details of All Open Transactions
It was 3am in the morning and I was asleep and enjoying a delightful dream (I knew it was a...
2018-02-07
468 reads
It was 3am in the morning and I was asleep and enjoying a delightful dream (I knew it was a...
2018-02-07
468 reads
We’ve now got ourselves a shiny new YouTube channel at UndercoverTV.
We’ll be using this to host our monthly podcasts as well...
2018-02-01
401 reads
sp_RestoreScript 1.2 is now available HERE and on GitHub
Changes include Service Broker options and the ability to restore a database in...
2018-01-30
650 reads
The first SQL Undercover podcast where Adrian introduces the Undercover Inspector, David releases sp_restorescript 1.2 along with a bit of...
2018-01-29
455 reads
Welcome along to the third part of our series ‘Creating a SQL Server Test Lab On Your Workstation’. If you’ve...
2018-02-02 (first published: 2018-01-24)
2,228 reads
Introducing: The SQLUndercover Inspector! Finally we have a V1 almost ready to hit our GitHub but what exactly is it?
Just another...
2018-01-22
495 reads
@adedba Adrian Buckman has been working hard and has put all of our scripts up on Github https://github.com/SQLUndercover/UndercoverToolbox
2018-01-18
373 reads
I’m sure that most of us know that SQL Server stores all it’s data in 8Kb pages. But what do...
2018-01-26 (first published: 2018-01-15)
2,010 reads
In the second part of our series on creating a SQL Server test lab on your workstation, I’m going to...
2018-01-12 (first published: 2018-01-03)
2,338 reads
One of the most useful tools to the DBA when we need to test new features, recreate a fault that...
2017-12-18
646 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 Risk Vs Reward, The never...
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...
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