SQL Server 2012 (“Denali”): AlwaysOn
AlwaysOn is a new integrated high availability (HA) and disaster recovery (DR) solution that provides redundancy within a datacenter and across datacenters...
2011-12-21
1,581 reads
AlwaysOn is a new integrated high availability (HA) and disaster recovery (DR) solution that provides redundancy within a datacenter and across datacenters...
2011-12-21
1,581 reads
I wrote a while back about my coffee cup from SQLSaturday #100. I took it to work (where I usually...
2011-12-21
643 reads
Virtualization is awesome! It really helps when you are a developer. On my laptop I don’t even have SQL Server...
2011-12-21
5,408 reads
After a server move to the failover Data Centre – a file copy between the two sites slowed down by 6x. ...
2011-12-21
668 reads
As I write this the final hours for the 2011 PASS Board of Directors elections are ticking away. Before the...
2011-12-20
953 reads
A tribute is an expression of gratitude or praise. As I head into this holiday season I wanted to express...
2011-12-20
517 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
Looking at 2011 and the planned events so far for 2012 it’s easy to see that SQLSaturday is starting to...
2011-12-20
661 reads
If you are like me then you like to reinstall Windows on your laptop every few months to keep things...
2011-12-20
919 reads
Back when i was in school, me and a bunch of friends used to hangout at a diner. The diner was...
2011-12-20
6,727 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