PowerShell ISE Crashes
Working with PowerShell brings a lot of advantages and power to help manage a server. The more current your PoSh...
2018-11-19
577 reads
Working with PowerShell brings a lot of advantages and power to help manage a server. The more current your PoSh...
2018-11-19
577 reads
Hopefully, a database being taken offline is a known event and not a surprise. Occasionally there are gremlins, in the form of users with too many permissions, that tend...
2018-11-15
138 reads
Knowing when an event occurred within the database environment is a very important thing. Being able to act quickly when certain events occur is equally as important. Sometimes, we...
2018-11-13
12 reads
Knowing when an event occurred within the database environment is a very important thing. Being able to act quickly when...
2018-11-13
1,061 reads
There comes a point in one's career when a change is requisite. Big or small there always seems to be a tipping point that mandates some sort of change....
2018-11-13
9 reads
As is true in most facets of life, things tend to get stale and old. Sometimes this staleness can be visibly represented as the wrinkles on your face. Other...
2018-11-09
32 reads
As is true in most facets of life, things tend to get stale and old. Sometimes this staleness can be...
2018-11-09
2,333 reads
Cannot use the special principal 'dbo'. This error message can be misleading. This article will take you on a journey of common mis-steps along with the appropriate fix for...
2018-11-07
461 reads
It is not unusual to find a server where some random user created a bunch of jobs to be run...
2018-07-26 (first published: 2018-07-16)
2,494 reads
We all have our favorite scripts, tools or utilities. Those are the things that help make our jobs easier. Some...
2018-07-20 (first published: 2018-07-10)
2,194 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