Create a slipstream installer for SQL Server on Windows
Since the release of SQL Server 2008 Service Pack 1 in April 2009, it has been possible to install SQL...
2018-10-24
248 reads
Since the release of SQL Server 2008 Service Pack 1 in April 2009, it has been possible to install SQL...
2018-10-24
248 reads
One of the areas that Redgate is working on is making data classification easier. Microsoft added some capabilities to SSMS...
2018-11-09 (first published: 2018-10-24)
3,224 reads
Wow! The last five years of my career have been amazing. I went from attending a SQLSaturday a couple of...
2018-10-24
254 reads
Statistics are the magic ingredient that helps the query optimizer create its best guess for generating an execution plan. Keeping...
2018-11-01 (first published: 2018-10-24)
3,223 reads
A while back a friend of mine, Malathi Mahadevan (b/t), asked me if I’d like to do an interview for...
2018-10-24
237 reads
How often have you felt like you need an extra pair of hands? When you’re planning a party? Maybe. When...
2018-11-01 (first published: 2018-10-24)
2,507 reads
I have finally uploaded my Azure SQL Database presentation, apologies for the delay. I am already working on an improved...
2018-10-24
814 reads
Coeo is a partner with Redgate Software. Tomorrow they are hosting a webinar on what your position will be if...
2018-10-23
396 reads
I used to use ALT+X to execute queries in SSMS. I spent years with this shortcut, but as I started...
2018-11-05 (first published: 2018-10-23)
2,241 reads
If you attended either of my presentations for this past IT/Dev Connections, here are the promised slides and scripts.
As I...
2018-10-23
252 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