Implicit Conversions warning
After adding an index, ensuring that an index is actually used is probably the biggest win you will get in...
2011-10-17
1,264 reads
After adding an index, ensuring that an index is actually used is probably the biggest win you will get in...
2011-10-17
1,264 reads
Today we have a guest post from Steve Jones as Brad is on vacation.
Today we have the third question from...
2011-10-17
532 reads
Win a trip into space!
The DBA in Space competition continues today with the third question. This time I get to...
2011-10-17
1,450 reads
Another Summit done gone by and I’m exhausted. You know you did the Summit correctly if you’re crawling onto the...
2011-10-17
1,446 reads
On Friday, October 14, 2011, I had the pleasure of delivering my new Scaling SQL Server presentation at the PASS...
2011-10-17
809 reads
Over the past few years I have developed a list of ways to improve performance in SSAS and in two...
2011-10-17
4,145 reads
SQL PASS Summit 2011: Session Files
PASS Summit 2011
This past week was the SQL PASS Summit 2011 in Seattle, WA. I...
2011-10-17
1,432 reads
Marco Russo and Alberto Ferrari have written a book called Microsoft PowerPivot for Excel 2010: Give Your Data Meaning that I finally...
2011-10-17
1,241 reads
I’ve been working quite a bit over the last week or so with extended events in Denali. The sheer magnitude...
2011-10-17
1,892 reads
Lesson 2: Internal Structures, Vardecimal, & Row Compression
Welcome to Lesson 3 on Compression and welcome back Dear Reader. I want...
2011-10-17
1,102 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