Making a Change Log Easier With PowerShell
Having a Change Log is a good thing. A quick and simple place to find out what has changed on...
2014-12-16 (first published: 2014-12-08)
5,161 reads
Having a Change Log is a good thing. A quick and simple place to find out what has changed on...
2014-12-16 (first published: 2014-12-08)
5,161 reads
T-SQL Tuesday, which was started by Adam Machanic (blog|twitter) and is now starting its 6th year, is hosted by a...
2014-12-09
795 reads
Operational Insights is a service that has been added in preview to Azure. It enables you to collect, combine, correlate...
2014-11-28 (first published: 2014-11-24)
6,802 reads
So you have read that you should have alerts for severity levels 16 to 24 and 823,824 and 825 on...
2014-11-28 (first published: 2014-11-18)
7,157 reads
What is T-SQL Tuesday?
T-SQL Tuesday is a monthly blog party hosted by a different blogger each month. This blog party...
2014-11-11
2,420 reads
I have a lab on my laptop running various servers so that I can problem solve and learn and recently...
2014-11-05
555 reads
A DBA doesn’t want to run out of space on their servers, even in their labs! To avoid this happening...
2014-11-04
4,918 reads
So you have read up on VLFs
No doubt you will have read this post by Kimberly Tripp and this one...
2014-10-06
718 reads
When I talk to people about Powershell they often ask how can they easily learn the syntax. Here’s a good...
2014-09-09
739 reads
A short post today to pass on a script I wrote to fulfil a requirement I had.
Which indexes are on...
2014-09-07
539 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