I’m speaking at the first ever SQL Saturday San Antonio on 8/13/16!
San Antonio is such a great city with a lot to see and do, such as the Alamo and the...
2016-07-23
369 reads
San Antonio is such a great city with a lot to see and do, such as the Alamo and the...
2016-07-23
369 reads
I was recently browsing www.myplates.com and I’ll say it’s actually quite fun to see what plates people have randomly bought....
2016-07-21
594 reads
Have you ever tried to query the contents of the default trace and then spent more time trying to figure...
2016-07-18
482 reads
If you’re in Louisiana or Texas this is one SQL Saturday you won’t want to miss. This annual event is...
2016-07-18
313 reads
I’ve been using Microsoft’s cloud database for some time now. I’ve had a few customers with various performance problems and...
2016-07-15
2,217 reads
With less than we week away, I can say that I’m really excited to reach more people in the community...
2016-07-08
410 reads
For those of us in the US, it’s our day of independence. A day that stands for FREEDOM and happiness....
2016-07-05
1,620 reads
Over the years I have come to see that every database has what I call data type drift. Simply put,...
2016-07-13 (first published: 2016-06-28)
2,517 reads
Security is a vital component of data security. In today’s day and age it is imperative to think about security....
2016-07-04 (first published: 2016-06-24)
1,622 reads
I was recently doing some work on my Windows 10 desktop and placed a drive on one of the slower...
2016-06-30 (first published: 2016-06-23)
1,652 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