Looking Back: 2016 was Awesome!
With 2017 starting this week I would like to take a moment and reflect on 2016. I have to admit...
2017-01-05
434 reads
With 2017 starting this week I would like to take a moment and reflect on 2016. I have to admit...
2017-01-05
434 reads
With 2017 starting this week I would like to take a moment and reflect on 2016. I have to admit that 2016 was a great year for many different...
2017-01-05
13 reads
Three reasons why I am attending PASS Member Summit in 2016
Over the past few weeks, I saw on social media...
2016-10-26
477 reads
A few months ago, I posted a question over on ask.sqlservercentral.com. In a nutshell, it was how do you measure...
2016-09-06 (first published: 2016-08-24)
2,679 reads
Today, I want to focus on how we can monitor wait statistics in an Azure SQL Database. In the past,...
2016-08-30
1,044 reads
Unfortunately, with Azure SQL Database you are not able to take an existing SQL Server Backup and restore it on...
2016-08-01 (first published: 2016-07-26)
2,277 reads
There are a lot of new features in SQL Server 2016. Availability Groups by itself got a lot of new...
2016-07-12 (first published: 2016-06-29)
3,699 reads
My First Microsoft SQL Server MVP Award
Today, I have achieved an SQL Someday moment. I am excited to share some exciting...
2016-07-01
594 reads
I love Azure and I love PowerShell. They are a perfect marriage. It’s amazing how much automation you can do...
2016-06-23
546 reads
The Austin SQL Server User Group will host its third SQL Saturday on Saturday,
SQL Saturday Austin on January 30th, 2016
January...
2016-01-12
479 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