Cluster failover – what’s the best way to get notified?
G’day,
I look after several clustered instances of SQL SERVER. One of the tasks that I do every morning is to check...
2011-03-27
2,839 reads
G’day,
I look after several clustered instances of SQL SERVER. One of the tasks that I do every morning is to check...
2011-03-27
2,839 reads
G’day,
Occasionally, I hear things that surprise me. And one of the statements that I’ve heard lately that fits into that category is...
2011-03-24
403 reads
G’day,
When I design a table in SQL SERVER, I like to have a reasonable understanding of how the table will...
2011-03-19
1,766 reads
In part one, I gave a general overview of some of the things that may affect IT services in the...
2011-03-15
546 reads
G'day,
I've just readPaul Randal's sqlmag article about the need to test your disaster recovery strategy. In that article Paul mentions...
2011-03-15
1,169 reads
Well, I attended a full week of SQL internals from Paul Randal [Blog | Twitter] and Kimberley L. Tripp [Blog | Twitter]...
2011-03-06
508 reads
Well, what a week it’s been. I started my winning blog post for the SQLskills blogging competition by stating that...
2011-01-30
2,104 reads
At last, my blog is starting to pay real dividends. Not only do I get the opportunity to publish my...
2011-01-23
4,047 reads
The object property function appears to be often overlooked.
This function will tell us about any schema scoped object in the...
2011-01-20
1,306 reads
I feel that it is wise move for a script to actually check itself that the database connection that is...
2011-01-16
1,404 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