Setting DBCC 1222 on startup
The following command is run to gain details on deadlocks.
DBCC TRACEON (1222,-1)However, once the SQL instance is restarted this flag...
2016-09-19
149 reads
The following command is run to gain details on deadlocks.
DBCC TRACEON (1222,-1)However, once the SQL instance is restarted this flag...
2016-09-19
149 reads
Remote server management is a fact of life for folks involved with sql server. Since we work so often with...
2016-08-29
666 reads
Remote server management is a fact of life for folks involved with sql server. Since we work so often with...
2016-08-29
181 reads
command line install options
ReadyRoll has some great features, including the ability to use without cost on a build server. If...
2016-08-26 (first published: 2016-08-18)
1,122 reads
If you haven't explored the visual color coding of tabs based on pattern matches with SQL Prompt, I'd suggest you...
2016-08-23
1,124 reads
If you haven't explored the visual color coding of tabs based on pattern matches with SQL Prompt, I'd suggest you...
2016-08-23
232 reads
SQL 2016 - New Functionality
These are notes taken from the Houston SQL Pass User group from July. This presentation was given...
2016-08-19
842 reads
These are notes taken from the Houston SQL Pass User group from July. This presentation was given by John Cook,...
2016-08-19
180 reads
command line install options
ReadyRoll has some great features, including the ability to use without cost on a build server. If...
2016-08-18
279 reads
In the context of my developer machine, I had log files I wanted to parse through. I setup a log...
2016-08-17 (first published: 2016-08-11)
3,377 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