2015-04-30
1,121 reads
2015-04-30
1,121 reads
Have you been to Atlanta, Georgia ? Nope? Well it’s time you plan that trip and come see me speak May...
2015-04-30
974 reads
This past week I had the pleasure of being part of the second SQL Server virtualization workshop held by VMware....
2015-04-30
1,171 reads
I was dealing with a challenging dynamic sql procedure that allowed a .NET app to pass in a list of...
2015-04-30
852 reads
Last weekend, we held our SQL Saturday event in Exeter. It was a brilliant event for many reasons but we...
2015-04-30
1,106 reads
Azure SQL Database Elastic Scale Part 2 - The Shard Map Manager Database
MAY 1, 2015
In my last post, I discussed some of the concepts around Sharding and how we...
2015-04-30
134 reads
Azure SQL Database Elastic Scale Part 2 - The Shard Map Manager DatabaseMAY 1, 2015
In my last post, I discussed some...
2015-04-30
4,975 reads
Recently I needed to find a stored procedure that was creating a lock on a table and updating the table regularly. So my starting point was the table name,...
2015-04-30
10 reads
I had to do this recently and needed to look up the syntax as I couldn’t remember it. I don’t...
2015-04-29
1,402 reads
Reading Time: 1 minutesMany times the DBA is faced with the dilemma of granting excessive...
The post They Can Do What?...
2015-04-29
984 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