PASS Summit 2018 – Call for Speakers
It is that time again. PASS has opened the Call for Speakers. I have submitted for the past 10 years,...
2018-02-28
479 reads
It is that time again. PASS has opened the Call for Speakers. I have submitted for the past 10 years,...
2018-02-28
479 reads
Do you ever find yourself working on a query and realize that you need just a bit more real estate...
2018-02-28
602 reads
I love when I get the opportunity to present at SQLSaturday events. Even more than that, I love when I...
2018-03-09 (first published: 2018-02-28)
1,676 reads
With the Automating Database Deployment: Part 3 Running RoundhousE post we walked through running a RoundhousE deployment for the first time to create the database and several database objects. Script naming...
2018-02-28
73 reads
If you are a Sr DBA or developer you have probably had some variation of this conversation at multiple points...
2018-02-28
415 reads
You can watch on YouTube now: https://www.youtube.com/watch?v=0qyMutBkZsg
If you want slides and notifications, register on the Redgate hub.
We’re recording the sessions...
2018-02-28
848 reads
When working with partitioning the SWITCH operation has to be my favourite. The ability to move a large amount of...
2018-02-28
3,155 reads
Last week I spoke about a world wary data type for storing dates and times in a single column, with...
2018-02-28
1,074 reads
Situation Your query is waiting for another query and the other query is doing nothing. Blocking Locks A blocking lock...
2018-02-28
250 reads
Situation Your query is waiting for another query and the other query is doing nothing. Blocking Locks A blocking lock...
2018-02-28
502 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