Risking Health, Life and Family
Since announcing the topic last week for T-SQL Tuesday, I have thought about many different possibilities for my post. All of them would have been really good examples. The...
2014-02-11
6 reads
Since announcing the topic last week for T-SQL Tuesday, I have thought about many different possibilities for my post. All of them would have been really good examples. The...
2014-02-11
6 reads
Since announcing the topic last week for T-SQL Tuesday, I have thought about many different possibilities for my post. All...
2014-02-11
836 reads
On the second Tuesday of each month, the SQL Server universe all comes together to blog about a topic. Known...
2014-02-14 (first published: 2014-02-11)
1,815 reads
Ran across a comment the other day that scalar functions prohibit parallelism for a query when included. I thought it...
2014-02-11
860 reads
Following is a list (in alphabetical order) of top domains related to analytics, data science or big data, based on...
2014-02-11
462 reads
I found Tell Me How I’m Doing by Richard L. Williams at the local library. It’s a book about giving...
2014-02-11
611 reads
Or….deadlock notifications.
In my previous post I talked about having your own database(s) and what information you could be collecting. One...
2014-02-11
600 reads
f you’re planning to use HDFS Explorer with the Hortonworks Sandbox or Cloudera VM, you’ll need to define your Hadoop...
2014-02-11
1,506 reads
I was talking recently with my friends and former colleagues at Idera about the things that slow down SQL Server....
2014-02-11
1,091 reads
It’s T-SQL Tuesday time again and Jason Brimhall is hosting this month’s event. He used to live in Las Vegas,...
2014-02-11
790 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