Catch up on SQL in the City 2018–GDPR Edition
The videos for our SQL in the City 2018 broadcast from last month are up on the Redgate channel in...
2018-03-08
395 reads
The videos for our SQL in the City 2018 broadcast from last month are up on the Redgate channel in...
2018-03-08
395 reads
WIN at IT contracting: A FREE guide showing YOU How to get the most out of Recruitment Agent Relationships
Welcome to WIN at IT contracting: A...
2018-03-08
529 reads
A couple weeks ago Carlos L. Cachon (blog|twitter) put out a call on Twitter looking for SQL Saturday organizers to join him on the SQL Data Partners Podcast. When...
2018-03-08
14 reads
I've been hearing about round-robin read-only routing ever since SQL 2016 came out but whenever I tried to test if...
2018-03-08
321 reads
Here’s a good starter article on SQL Server logins, users, and SIDs: SQL Server Logins, Users and Security Identifiers (SIDs) Some...
2018-03-07
477 reads
Many of the widely advertised and talked about features of SQL Server or other software products focus exclusively on the...
2018-03-07
378 reads
Update: Instead of reading this blog post, I suggest you read the article, “The Secret History of Women in Computing: Computer programming once had much better gender balance than...
2018-03-07
27 reads
Hello all-
More than a year's work went into the newest Inside Out book by Microsoft Press, I was happy to...
2018-03-07
726 reads
Better than month 1. Only XE this month.
My first week I got a reminder to spend some time on XE,...
2018-03-07
378 reads
This post continues our look at date and time data types in SQL Server. SQL Server 2008 introduced new data...
2018-03-07
417 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