SQL and NOT SQL: Best of 2017
Photo by Rick Meyers on UnsplashWith only a few days left in 2017, I thought it would be fun to do a year...
2017-12-26
429 reads
Photo by Rick Meyers on UnsplashWith only a few days left in 2017, I thought it would be fun to do a year...
2017-12-26
429 reads
With only a few days left in 2017, I thought it would be fun to do a year in review post. Below you'll find some of my top 5...
2017-12-26
9 reads
Some view the permissions for Extended Events as a limitation. I see the required permissions as an appropriate set and recommend all to work with XE and permissions to...
2017-12-26
141 reads
A common question that I am asked about Extended Events relates to what kind of permissions are required in order...
2017-12-26
159 reads
A common question that I am asked about Extended Events relates to what kind of permissions are required in order...
2017-12-26
17,391 reads
SQL Server 2017 brings a new interesting feature, that might be a game changer in some environments. I’m talking about...
2017-12-25
644 reads
Dear All, Earlier this year in August, I had the privilege of speaking at Data Platform Summit 2017 at Bangalore. As always a terrific experience to hangout, interact and...
2017-12-23
19 reads
Dear All, Earlier this year in August, I had the privilege of speaking at Data Platform Summit 2017 at Bangalore. As always a terrific experience to hangout, interact and...
2017-12-23
16 reads
Continuing on the series on Adaptive Query Processing covered over here, this post would cover what happens to adaptive joins when plans are reused.
To give a...
2017-12-23
23 reads
Continuing on the series on Adaptive Query Processing covered over here, this post would cover what happens to adaptive joins when plans are reused.
To give a...
2017-12-23
31 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