Ad Hoc SQL Server Help
I just need a few hours of your time… We get a variation of this request a LOT. So now it’s time to do something about it! Ad Hoc...
2026-03-02
54 reads
I just need a few hours of your time… We get a variation of this request a LOT. So now it’s time to do something about it! Ad Hoc...
2026-03-02
54 reads
This isn’t a religious debate. I have a client right now debating how to handle SQL Server upgrades across all of their dev and test environments. And it’s...
2026-02-18 (first published: 2025-12-31)
445 reads
Some of the best career enhancers you can buy. Why I Go to Conferences I go for two big reasons: Learning from the best. The folks teaching at...
2025-12-01 (first published: 2025-11-12)
301 reads
The terminology around reliability is a mess If you’ve ever said, “We’re covered, it’s replicated,” you’re in good company. SQL Server is a massive, 35+ year-old product that...
2025-11-19
46 reads
Don’t Let Trouble Sneak Up on You Most SQL Servers run quietly. Until they don’t. By the time someone notices an application outage or a failed backup, you’re...
2025-11-03 (first published: 2025-10-15)
365 reads
If your production SQL Servers are still running 2016 (or older) you’re basically banking on inertia. Sure, it’s been stable. But that doesn’t guarantee it’ll stay safe or compliant....
2025-10-29
52 reads
In parts 1 and 2 of this series, we’ve gathered info and done the triage just like anyone in almost any industry does At this point you’ve: Defined what...
2025-10-27 (first published: 2025-10-01)
1,763 reads
It’s Not Just Backup / Restore At some point every company faces it: the SQL Server that’s been quietly running for years is due for retirement. Maybe the hardware...
2025-10-22
45 reads
How should you respond when you get the dreaded Email/Slack/Text/DriveBy from someone yelling at you that SQL Server is slow? Stop. Don’t Open SSMS Yet. You’ve heard it...
2025-10-08 (first published: 2025-09-17)
452 reads
Parts 1, 2 and 3 got you to the (SQL) engine room. Now we use community-trusted tools to find what’s going on, fix it safely, and hopefully keep it...
2025-10-07
217 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