T-SQL Tuesday #203: Risk and Reward
This is timely, as I’m currently on a boat in the Adriatic taking a break with my wife. I think I’m in Croatia (or off the coast) today, but...
2026-10-13
10 reads
This is timely, as I’m currently on a boat in the Adriatic taking a break with my wife. I think I’m in Croatia (or off the coast) today, but...
2026-10-13
10 reads
You can find the slides and SQL scripts for my session “Spice up your SQL – Intro to window functions” at GitHub.
The post dataMinds Connect 2026 – Slides &...
2026-10-12
20 reads
How to Clear the SSMS Cache (SSMS 21 and Later)
Updated for SSMS 21 and later: This is a new, rewritten version of my earlier article...
2026-10-10
73 reads
“What exactly did it do on my server?” is the first question a DBA should ask about any AI agent. AgentDBA answers it from its own records: every decision...
2026-10-09
35 reads
Microsoft shared a broad set of Fabric, Power BI, and SQL updates at FabCon and SQLCon Barcelona 2026, with approximately 5,000 attendees at the conference. I’ve tried to make...
2026-10-08
114 reads
No, I’m not quitting or retiring. Just going on vacation, but I leave tonight for Brussels and this is my last day at work for a couple of weeks....
2026-10-07
30 reads
A few years ago I took a new job at Microsoft, working as a Senior Content Developer, and as of this writing I own all the SQL Server content...
2026-10-05
151 reads
I caught this interesting item over on Pinal Dave’s blog: Eleven Interview Questions that Look Too Easy. I decided to give you a few thoughts from me on the...
2026-10-14 (first published: 2026-10-05)
224 reads
I use color-coded connections in SSMS to distinguish Production, Pre-Production, UAT, and Development. But why keep this important visual warning at the bottom of the screen? In this post,...
2026-10-14 (first published: 2026-10-05)
272 reads
Here are the resources for my talk at Day of Data Boston. Slides – ArchitectingZeroDowntime.pptx Slides also at: https://dayofdata.org/2026-10-03-dayofdata1150/#schedule Code: https://github.com/way0utwest/ZeroDowntime Book: Refactoring Databases Some interesting questions. I’ll write...
2026-10-04
79 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