TSQL Recipes – 2014 Edition
Announcing…the book At long last the wait is over. After much blood, sweat and more blood and sweat, the next edition of the SQL Server Recipes book is finished....
2015-07-21
10 reads
Announcing…the book At long last the wait is over. After much blood, sweat and more blood and sweat, the next edition of the SQL Server Recipes book is finished....
2015-07-21
10 reads
Announcing…the book
At long last the wait is over. After much blood, sweat and more blood and sweat, the next edition...
2015-07-21
545 reads
Bringing years of experience together in two all day workshop sessions.
Related Posts:
Seattle SQL Pro Workshop 2017 October 19, 2017
Finding Installed Event Sessions December 31, 2018
Sharepoint Diagnostics and...
2015-07-17
7 reads
I am about to set sail on a new venture with my next official whistle stop. This year has been...
2015-07-17
860 reads
What is that default setting? SQL server does a fantastic job of having numerous settings at the server level and at the database level predefined for you. Additionally, the...
2015-07-14
17 reads
What is that default setting?
SQL server does a fantastic job of having numerous settings at the server level and at...
2015-07-14
611 reads
Quick run the other way! PASS Summit will never be the same! Why? Well, because for the first time in the history of me, I have been selected to speak...
2015-07-13
9 reads
Quick run the other way!
PASS Summit will never be the same!
Why?
Well, because for the first time in the history of me,...
2015-07-13
606 reads
One of my pet-peeves (and consequently frequent topic of discussion) is finding database settings (or any setting that has changed) without knowing about it. Worse yet is finding that...
2015-07-08
20 reads
One of my pet-peeves (and consequently frequent topic of discussion) is finding database settings (or any setting that has changed)...
2015-07-08
638 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