2020-02-11
887 reads
2020-02-11
887 reads
I’ve been an advocate for database DevOps since before DevOps was a thing. When I first switched from being a developer full-time to being a DBA full-time, the first...
2020-02-10 (first published: 2020-02-04)
337 reads
Because of my job with Redgate (which I love and will never leave even after I’m dead), I spend a lot of time learning about compliance and all the new laws and regulations coming out of things like the GDPR and the CCPA (they changed the name evidently). However, I’m a nerd. I’m not a […]
2020-02-08
158 reads
I’ve decided that, in fact, it is time to start moving people off the ancient technology, Profiler. Before, I always said, stay where you’re comfortable. However, keeping people comfortable...
2020-02-06 (first published: 2020-02-03)
880 reads
Today, Grant talks about keeping your laptop and phone safe while traveling.
2020-02-05
280 reads
2020-02-04
949 reads
2020-02-03
189 reads
2020-01-30
268 reads
Query tuning is not easy. In fact, for a lot of people, you shouldn’t even try. It’s much easier to buy more, bigger, better hardware. Yeah, the query is...
2020-01-29 (first published: 2020-01-21)
921 reads
I know, I know, I’m on #teamexevents so I think that Extended Events can do no wrong, but let’s address this thought that Profiler is easier. Now, if we’re...
2020-01-28 (first published: 2020-01-20)
536 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