Using the PowerShell AST to find a ForEach Method
In dbachecks we enable people to see what checks are available by running Get-DbcCheck. This gives a number of properties including...
2018-08-16
340 reads
In dbachecks we enable people to see what checks are available by running Get-DbcCheck. This gives a number of properties including...
2018-08-16
340 reads
Have you ever heard of SQL Reserved vCores? Well I never until recently. With this concept you have the ability...
2018-08-16
348 reads
Kevin Hill (blog|twitter) posted a thought-provoking item on his blog last week about Disaster Recovery Plans. While I am in the 10% who perform DR tests for basic functionality...
2018-08-16
9 reads
Shall I compare thee to Management Studio? Thou art more scriptable and consistent. Those out-of-memory errors do tend to lose...
2018-08-15
332 reads
SQL Server 2017 is considered a major release in the history of the SQL Server life cycle for various reasons....
2018-08-15
1,370 reads
I’m excited to announce that I’m joining the evangelist team at Redgate. Starting next Monday, I’ll be working with Steve Jones, Grant Fritchey, and Kathi Kellenberger — plus the whole...
2018-08-15
26 reads
Do I need relational or NoSQL? How does NoSQL help me scale? Will I get paid better with NoSQL or...
2018-09-07 (first published: 2018-08-15)
2,876 reads
Over the last few days we have been tracking down the cause of some really high async network IO waits. ...
2018-08-30 (first published: 2018-08-15)
3,061 reads
When you are working on the AlwaysOn feature, it is crucial to understand how the AlwaysOn commit process works. This...
2018-08-15
5,749 reads
This is my second installment in a series responding to Steve Jones’s (blog|twitter) #SQLCareer challenge. I decided to jot down most of what I did through the day, filling...
2018-08-15
13 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