Luck and the PASS Summit
I recently read an article asking the question whether or not we downplay the role that luck plays in our...
2017-09-05
336 reads
I recently read an article asking the question whether or not we downplay the role that luck plays in our...
2017-09-05
336 reads
Over at Redgate, we’ve been working on a new way to get information to you. It’s called the Redgate Hub....
2017-09-04 (first published: 2017-08-23)
862 reads
Guten Tag!
OK, switching back to English for the rest of this.
I’m going to be spending a few weeks in Germany...
2017-08-30
539 reads
SQL Server provides all different kinds of data types in order to give you more flexibility and control for how...
2017-08-29
651 reads
SQL Server provides all different kinds of data types in order to give you more flexibility and control for how...
2017-08-29
1,433 reads
Are you going to be in Florida in November? Me too. I’m privileged to say that I get to speak...
2017-08-28
288 reads
Are you going to be in Florida in November? Me too. I’m privileged to say that I get to speak...
2017-08-28
442 reads
Lots of people are confused by how to deal with bad parameter sniffing when it occurs. In an effort to...
2017-08-24 (first published: 2017-08-15)
2,362 reads
Over at Redgate, we’ve been working on a new way to get information to you. It’s called the Redgate Hub....
2017-08-23
202 reads
Capturing query execution metrics is much easier now that you can see the runtime metrics in execution plans when you’re...
2017-08-22
256 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