SQL in the City 2017
Redgate is once again hosting a live, virtual event for SQL in the City. We’re going to give you a...
2017-12-08
318 reads
Redgate is once again hosting a live, virtual event for SQL in the City. We’re going to give you a...
2017-12-08
318 reads
I know that when some people see AdventureWorks, their vision turns all red around the edges, their blood pressure spikes...
2017-12-04
378 reads
I know. You love Profiler. I hear you. You’re wrong, but that’s OK. Kidding… mostly.
Unfortunately though, I think a lot...
2017-11-29 (first published: 2017-11-20)
1,405 reads
Chances are extremely high that I’ll never put down Data Scientist as my job. Considering what you do and what...
2017-11-22
408 reads
I have a real infatuation with Azure. I’m especially interested in the Platform as a Service (PaaS) offerings in and...
2017-11-15
307 reads
March 23rd, 2018, I’ll be teaching an all day class on Query Tuning Tools in Richmond Virginia. I hope to...
2017-11-14
376 reads
Ever heard of the General Data Protection Regulation? If not, go and read the Wiki. I’ll wait.
I can already hear...
2017-11-13
308 reads
There’s a war on in the SQL Server world. On the one side is Profiler (although, really, everyone uses Trace...
2017-11-07
453 reads
As you read this, I’m in Seattle for the PASS Summit 2017. I have four roles that I satisfy at...
2017-10-30
587 reads
I find it extremely easy to sometimes lose sight of the important stuff. The day-to-day grind can seriously get in the way. I think this is a big part of how we find ourselves having so many silly intra-organizational turf wars. The developers don’t like how the DBAs do things. The DBAs are frustrated with […]
2017-10-30
90 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