Among Giants
Since becoming a Database Administrator I’ve always looked at Microsoft MVP’s as the giants in our field. I never once...
2017-04-05
338 reads
Since becoming a Database Administrator I’ve always looked at Microsoft MVP’s as the giants in our field. I never once...
2017-04-05
338 reads
I recently had the pleasure of being a guest on a Podcast episode with the SQL Data Partners Carlos Chacon...
2017-04-03
358 reads
I didn’t know about this little gem, so I shared it with my team and they didn’t know about it...
2017-03-29
715 reads
We have all made mistakes in our careers, I thought I’d share one of mine as a quick tip to...
2017-01-10
581 reads
How many of you actually have a “Hit-by-the-Bus” handbook? What is that, you ask? It is a document that explains...
2016-12-21
1,244 reads
Ever had users come to you and request another version of a report just to add another field and group...
2016-12-09
618 reads
Ok everyone; here goes my first crack at replying to a T-SQL Tuesday. For those that don’t know what it...
2016-11-08
208 reads
My life for the last 2 years has been a constant battle of putting out fires with system performance; finally...
2016-09-14
317 reads
This year has been a whirlwind so far, thanks to the Idera ACE program. For those that don’t know what...
2016-08-23
294 reads
I’m It Survival Tips for the Lone DBA – Level 100
(Not Accepted: Higher rated session selected)
Track: Professional Development
As others have done I...
2016-06-28
222 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