SQL Express and the Curse of the Perfmon Counters
On a dark and spooky night in the land of SQL Server make-believe, a young warrior was asked to slay...
2012-02-05
1,152 reads
On a dark and spooky night in the land of SQL Server make-believe, a young warrior was asked to slay...
2012-02-05
1,152 reads
I have been given the opportunity to deliver a few webcasts about some of the new features of SQL Server...
2012-02-03
1,359 reads
A few years ago, I wrote a script that was published on SQLServerCentral.com about how to verify the last successful...
2012-02-03
1,726 reads
As a DBA, I enjoy knowing that the better job I do, the less likely it is that any of...
2012-01-17
952 reads
I recently had to enable tokens in SQL Agent across about 50 instances. Unfortunately, enabling tokens requires a SQL Agent...
2012-01-05
1,772 reads
So, how do you recover from the Holidays? Hot Cocoa by the fire? Relaxing evening with your spouse watching an...
2011-12-26
1,619 reads
One task that often needs to be done when migrating a database to production for the first time is to...
2011-12-20
1,415 reads
One challenge I’ve had recently is getting a list of servers imported in to a CMS (Central Management Server). While...
2011-12-13
5,160 reads
I was reading through the SQL Server 2005 SP3 release notes yesterday (sadly, it was enjoyable) and clicked through to...
2008-12-19
808 reads
Over the past several months, I’ve started diving into the world of wait stats on my instances. An ever present...
2008-12-03
734 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