FizzBuzz and Multiple Recursive Member CTEs
Watch this week's video on YouTube
Last week I needed to write a recursive common table expression. I've written them before, but it's been a while and needed to visit...
2018-08-21
23 reads
Watch this week's video on YouTube
Last week I needed to write a recursive common table expression. I've written them before, but it's been a while and needed to visit...
2018-08-21
23 reads
Watch this week's video on YouTube
Last week I needed to write a recursive common table expression. I've written them before, but it's been a while and needed to visit...
2018-08-21
18 reads
Just a quick post to share some code that I used to solve a problem I had recently.
I needed to...
2018-09-04 (first published: 2018-08-21)
5,900 reads
Please join me for a day of developing and deploying Power BI reports in an On-Premises environment. This event is a pre-conference session on the Friday before SQLSaturday #801...
2018-08-21
24 reads
The Midlands PASS Chapter, a local group of PASS, will restart on October 2nd, 2018. We will be meeting at...
2018-08-20
200 reads
New this year to #SQLSatBR that was really nice for us - we hosted a kid's STEM track leveraging an existing children's education organization operated by the STEMupBR program...
2018-08-20
20 reads
Please join me for a day of developing and deploying Power BI reports in an On-Premises environment. This event is...
2018-08-20
259 reads
Why don’t “actual execution plans” have “actual execution plan costs”? This is a question and a myth I have to...
2018-08-20
320 reads
Lets just get straight to the point, Azure SQL Database across all service tiers gives you the customer a SLA...
2018-08-20
268 reads
Last Thursday I spoke at NTSSUG (North Texas SQL Server User Group). This is my local group (only 1.5 hours...
2018-08-20
220 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