Upcoming Performance Tuning Webcast
On September 13, 2018, at 3 PM Eastern (USA), I’ll be giving a webcast for MSSQLTips.com on finding and correcting...
2018-08-28
217 reads
On September 13, 2018, at 3 PM Eastern (USA), I’ll be giving a webcast for MSSQLTips.com on finding and correcting...
2018-08-28
217 reads
At Redgate, we release a lot of changes to our products. In fact, this is the “About Redgate” slide I’ve...
2018-08-28
1,118 reads
Another post for me that is simple and hopefully serves as an example for people trying to get blogging as...
2018-08-28
1,231 reads
Watch this week’s episode on YouTube.
The SQL Server FIRST_VALUE function makes it easy to return the “first value in an...
2018-08-28
9,004 reads
Watch this week's video on YouTube
The SQL Server FIRST_VALUE function makes it easy to return the "first value in an ordered set of values."
The problem is that if that...
2018-08-28
26 reads
Watch this week's video on YouTube
The SQL Server FIRST_VALUE function makes it easy to return the "first value in an ordered set of values."
The problem is that if that...
2018-08-28
22 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
Yesterday I linked to two really interesting posts about PASS and I hope you read them. I’ll start with a...
2018-08-28
246 reads
So you want to do a clean-up exercise in Azure and remove some databases. You go to delete a database...
2018-08-28
249 reads
When I hosted this past TSQL-Tuesday, I fully expected to have the wrap-up done a few days later. Lots of...
2018-08-28
240 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