Be in the SQL Yearbook
I’ve been thinking about this for years, and I’m finally doing it. I’m making a SQL Yearbook, and I want you to be...
2018-09-06
276 reads
I’ve been thinking about this for years, and I’m finally doing it. I’m making a SQL Yearbook, and I want you to be...
2018-09-06
276 reads
I am pleased to announce that as of September 10, 2018, I will be part of the SQL Data Partners...
2018-09-06
246 reads
We are often required to pass the data between different database procedures and functions. In this post I will review...
2018-09-06
344 reads
So today, this happened: Now I suddenly want to know how many bananas tall I am… https://t.co/7geupBzXDj — MidnightDBA (@MidnightDBA) September...
2018-09-06
321 reads
The PASS Summit 2018 schedule has been published, and I’m on it twice! On Monday, November 5, I am giving...
2018-09-06
278 reads
You know the talk out there, everyone is moving to the cloud and people are looking at Azure to get...
2018-09-06
292 reads
When you can connect to the individual nodes of a SQL Server Availability Group (AG), but not the AG listener,...
2018-09-05
891 reads
Continuing the series on dates and times in SQL Server and Azure SQL Database, this week we look at the...
2018-09-05
277 reads
Read Scale-Out is a little-known feature that allows you to load balance Azure SQL Database read-only workloads using the capacity of read-only replicas, for free. As mentioned in my blog Azure...
2018-09-05
131 reads
Read Scale-Out is a little-known feature that allows you to load balance Azure SQL Database read-only workloads using the capacity of...
2018-09-17 (first published: 2018-09-05)
2,552 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