Query Store, Plan Forcing and Table Variables
This weekend I was in Stockholm in Sweden, talking Query Store and plan forcing with Steinar Anderson, when he mentioned the problems he had while forcing plans that had...
2019-05-06
168 reads
This weekend I was in Stockholm in Sweden, talking Query Store and plan forcing with Steinar Anderson, when he mentioned the problems he had while forcing plans that had...
2019-05-06
168 reads
One part of my job is to understand the compliance landscape. This means that I read a lot about the GDPR and related similar laws. I also have to...
2019-05-03 (first published: 2019-04-22)
508 reads
The OUTER JOIN returns one complete set of data and then the matching values from the other set. The syntax is basically the same as INNER JOIN but you...
2019-04-25 (first published: 2019-04-15)
701 reads
GDPR enforcement began in May of 2018, but if you are doing business in the US, you may not think it applies to you. Grant Fritchey explains why you might be wrong about that and why you need to act now.
2019-04-16
I’m starting the process of learning how to use Jupyter Notebooks. Notebooks are documents that contain live code, commentary, results, pictures and more. Jupyter Notebooks are used for presentations,...
2019-04-08
41 reads
I was inspired by Jen McCown’s story here. Read that first. It’s WAY better than mine. This is not an April Fools post. Fools are involved, but none were...
2019-04-01
127 reads
Last week was the MVP Summit. This year included a bunch of very technical discussions about some of the future of the Microsoft Data Platform (a big thank you goes to Slava Oks, Bob Ward, and all the team for a great job). I can’t share much since it was all under NDA. All I […]
2019-03-30
523 reads
I love the questions I get when presenting: Can You Force a Parallel Plan in Query Store. I haven’t a clue. The trick I think is going to be...
2019-03-25
108 reads
I’ve shown before how to use the DMVs that read the plan cache as a way to connect the missing...
2019-03-22 (first published: 2019-03-11)
2,392 reads
You absolutely need to know about the servers you have under management in your estate. You need to know about...
2019-03-19
467 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