Azure Portal – Bad Request
I had a strange issue recently when trying to login to the Azure Portal. Quite simply I would enter my...
2018-01-16
275 reads
I had a strange issue recently when trying to login to the Azure Portal. Quite simply I would enter my...
2018-01-16
275 reads
Having a tool to be able to monitor CLR health will be essential as you deploy more and more managed code within SQL Server. Extended Events offers a great...
2018-01-16
29 reads
The Common Language Runtime (CLR) is the fundamental nerve center of the Microsoft .NET Framework. It is this nerve center that...
2018-01-16
1,029 reads
Table partitions can bring a lot of benefits to the manageability and performance of your SQL Server – that is if...
2018-01-16
988 reads
A significant portion of Yellowstone National Park sits on top of a supervolcano. Although it’s not likely to erupt any...
2018-01-16
1,180 reads
A significant portion of Yellowstone National Park sits on top of a supervolcano. Although it's not likely to erupt any time soon, the park is constantly monitored for geological...
2018-01-16
23 reads
TagLine – My goal – Chrissy will appreciate Unit Tests one day
Chrissy has written about dbachecks the new up and coming...
2018-01-15
345 reads
Next in our SQL Server on Linux series is one important question. On Windows, if you’re about to run out...
2018-01-29 (first published: 2018-01-15)
1,194 reads
There are several shortcuts that can be assigned to run a stored procedure. Known as Query Shortcuts, these can be...
2018-01-15
332 reads
I’m sure that most of us know that SQL Server stores all it’s data in 8Kb pages. But what do...
2018-01-26 (first published: 2018-01-15)
2,010 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