SQL Server Logical Query Processing
Recently, while reviewing one of the stored procedure performance, I suggested a couple of changes to a developer to improve...
2018-04-12
19,921 reads
Recently, while reviewing one of the stored procedure performance, I suggested a couple of changes to a developer to improve...
2018-04-12
19,921 reads
PASS Summit is the largest conference for technical professionals who leverage the Microsoft Data Platform. PASS Summit 2018 is happening November...
2018-04-11
314 reads
In this post I describe technique of presenting data that is context specific - for example, data that will be changing...
2018-04-11
1,187 reads
WHAT: EXECUTION PLANS FOR BEGINNERS
WHEN: Tuesday, 04/17/18 - 11:00 am – 12:00 pm
WHO: Thomas LeBlanc
WHERE: https://attendee.gotowebinar.com/register/7086336336602188044
This will be a Beginners session highlighting...
2018-04-11
600 reads
I enjoy themes, and when I ran across the SQL Prompt Treasure Island, I had to take a few minutes...
2018-04-11
1,593 reads
Now that we have covered the various date and time data types (see the post from last time) in SQL...
2018-04-11
871 reads
Database Code Smells
I was recently reviewing a newly created T-SQL stored procedure. This procedure was verifying temporary table existence with...
2018-04-11
2,430 reads
I often hear people say moving to the cloud does not save money, but frequently they don’t take into account...
2018-04-11
171 reads
I often hear people say moving to the cloud does not save money, but frequently they don’t take into account...
2018-04-11
1,017 reads
With all the noise about the upcoming enforcement of GDPR, I know that people are starting to focus more on...
2018-04-11
450 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