T-SQL Tuesday #26 - Second Chances - Correlate Missing Index with Related Query
Everybody deserves a second chance in love, life, and in TSQL as well! Now that it's the beginning of a New...
2012-01-10
5,168 reads
Everybody deserves a second chance in love, life, and in TSQL as well! Now that it's the beginning of a New...
2012-01-10
5,168 reads
A busy Database Server and application development environment can have – Sandbox, Dev, Test, QA, Staging, Production .
Maintaining multiple environments requires...
2012-01-10
2,657 reads
I've noticed in the forums there have been a number of people inquiring about making schema changes in a replication...
2012-01-10
5,796 reads
The Orlando IT Pro Camp marks our third event after Tampa and South Florida. As with the prior IT Pro...
2012-01-10
990 reads
It has been a quiet past few months while my family has adjusted to having
two new additions (twins!), but...
2012-01-10
925 reads
I have a friend looking for a production DBA in Denver, so if you’re interested, email me at SQLServerCentral.
They need...
2012-01-09
781 reads
We are now just a few days away from our first meeting of 2012. We have some good content lined up. Check it out here. I am looking forward...
2012-01-09
12 reads
We are now just a few days away from our first meeting of 2012. We have some good content lined...
2012-01-09
644 reads
I get asked this question a lot: When getting a new application and database, what kind of hardware do I...
2012-01-09
1,648 reads
When building a data warehouse, it is important that primary keys of dimension tables remain stable. To accomplish this, it...
2012-01-09
3,980 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