Database Health and Performance at SQLSaturday Detroit
Today I had the pleasure of speaking at the inaugural SQL Saturday event in Detroit, MI. I spoke on one of my...
2013-03-16
622 reads
Today I had the pleasure of speaking at the inaugural SQL Saturday event in Detroit, MI. I spoke on one of my...
2013-03-16
622 reads
I had the opportunity to present a full-day preconference session on Friday, March 15, 2013 for SQLSaturday #188 in Lisbon,...
2013-03-16
735 reads
CU2 for SQLServer 2012 SP1 is one key update which you should review and deploy if found necessary. I have...
2013-03-19 (first published: 2013-03-15)
2,461 reads
As part of SQL Server Pro eLearning series, I’ll be presenting three 75 minute sessions on March 26th on using...
2013-03-15
799 reads
Welcome to this Friday’s reblog summary post. The aim of these posts is to bring some old posts that newer...
2013-03-15
717 reads
Do you work for US Education? Are you interested in Learning about Microsoft BI? If so, please join me as...
2013-03-15
1,275 reads
As I mentioned in my original post, Exploring Excel 2013 as Microsoft’s BI Client, I will be posting tips regularly...
2013-03-15
1,184 reads
When developing and debugging transport security WCF services it’s a real pain if each developer on the team needs to...
2013-03-15
215 reads
I recently had to rename my laptop on which I have two SQL server instances. I have a default instance...
2013-03-14
1,695 reads
While I was at the 2011 Pass Summit I was given the following piece of code to create a comma...
2013-03-14
908 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