2020-11-02
534 reads
2020-11-02
534 reads
SQL Server Agent has a built-in alerting process for when jobs fail, but the information it provides isn’t very useful. You’re only told which job, what time, who ran it, and which step failed. If you want to see why it failed, you have to review the job history manually. On a busy system with […]
2020-10-29
7,940 reads
Losing your instance might result in the need to get information from what you have. Steve Jones looks at a way to get the proper version and patch, and database list, from what limited resources you might have.
2020-10-27
2,724 reads
-WhatIf you could see what would happen if you ran a command?
2020-10-23
3,991 reads
2020-10-19
463 reads
Do meetings and paperwork take a toll on administrators? Steve draws a comparison to some of the changes in the US healthcare system.
2026-05-29 (first published: 2020-10-14)
246 reads
2020-10-12
499 reads
2020-09-28
482 reads
Estate management keeps getting more complex, especially with the move to the cloud, or to multiple clouds. Today Steve talks about the need to ensure you know what the settings are in your environments.
2020-09-28
105 reads
Wanted to share this script to the community just in case anyone out there may be search for a way to allow a hosted customer the ability to query certain DMVs for information without granting them View Server State. There are some other options out there, but this worked better for me after going through […]
2020-09-24
2,461 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