Inspector V1.2 now available
It has been long overdue but finally V1.2 is now available on GitHub.
V1.2 brings a lot of changes, We put...
2018-10-10
381 reads
It has been long overdue but finally V1.2 is now available on GitHub.
V1.2 brings a lot of changes, We put...
2018-10-10
381 reads
Pre-requisites:
SQL 2012 or higher
SQL Server Agent
A database to store the the data collected by the agent jobs (this can be...
2018-10-10
307 reads
I recently came across a really odd issue with the SQL Agent, there were two agent jobs attached to one...
2018-10-11 (first published: 2018-10-02)
2,871 reads
In my recent post, Installing External Modules into SQL Server’s Python I had a look at just how simple it is to...
2018-09-18
602 reads
It’s the second Tuesday of the month which must mean only one thing…
We’re all skint and payday feels like a...
2018-09-11
284 reads
For those of you who don’t have time to watch the videos, the audio stream of our webcasts are now...
2018-09-05
307 reads
So Microsoft have integrated Python into SQL Server, from the moment I heard that I thought to myself, “wow, this...
2018-09-03
365 reads
The latest webcast from SQLUndercover.com. In this episode David and Adrian take a look at a few blog posts that have caught...
2018-08-29
392 reads
Easily Keep Track of All Your SQL Servers
We know what it’s like when you’ve got 101 SQL Servers to manage,...
2018-08-28
291 reads
I’m sure that we all know that SQL Server includes all sorts of interesting functionality to allow us to encrypt...
2018-08-27 (first published: 2018-08-09)
1,851 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