Speaking at SQL Saturday Atlanta (#733)
I am so honored and humbled to have been selected to speak at SQL Saturday Atlanta (#733) on May 19,...
2018-03-29
402 reads
I am so honored and humbled to have been selected to speak at SQL Saturday Atlanta (#733) on May 19,...
2018-03-29
402 reads
Security is an important and often overlooked function of technology. Don’t believe me? Go to a SQL conference and look...
2018-03-29
437 reads
Sometime we create databases on Test/ Development database servers for temporary uses for short duration and forgot to delete them after the work got completed. As a part of...
2018-03-29
33 reads
Sometime we create databases on Test/ Development database servers for temporary uses for short duration and forgot to delete them...
2018-03-29
1,927 reads
There are many query sets out there to collect varying groups of configuration data - the ones I most frequently use...
2018-03-29
720 reads
I had three ideas I considered submitting this year:
Devops for the DBASQL ChecklistsLearning Plans v2I’ve presented the first topic a...
2018-03-29
275 reads
SQLServerCentral has been stuck in the past for some time, but we’ve finally decided to move. I’ve been asking for...
2018-03-28
1,477 reads
This post continues our look at date and time data types in SQL Server. SQL Server 2008 introduced new data...
2018-03-28
717 reads
This article is part of the SQL Server Tools series, aimed at giving you an idea of the available tools and techniques...
2018-03-28
1,021 reads
As a follow-up to my blog Is the traditional data warehouse dead?, I did a webinar on that very topic for...
2018-03-28
103 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