Come see me in Baton Rouge Aug 2nd!
I've been accepted for SQL Saturday Baton Rouge!
Yes, I am a little excited. I've wanted to become a speaker for...
2014-06-16
524 reads
I've been accepted for SQL Saturday Baton Rouge!
Yes, I am a little excited. I've wanted to become a speaker for...
2014-06-16
524 reads
When surfing SQL Server forums you might notice a lot of questions like "How do I script my data and...
2014-06-17 (first published: 2014-06-15)
3,624 reads
Expert Cube Development with SSAS 2012 Multidimensional Models was published earlier this year by Packt Publishing. It’s the second edition...
2014-06-15
843 reads
Hello,
I have come across a really good tip if you’re using computed columns that involve a concatenation of columns and...
2014-06-15
754 reads
DateEventJuly 12 SQLSaturday #312 – Sacramento 2014July 26 SQLSaturday #302 – Albany 2014July 26 SQLSaturday #322 – Guatemala 2014The post PASS SQLSaturday Events:...
2014-06-15
690 reads
Photo credit – Mike Lynch
A good cure to a creepy doll is a good old post that is still useful. In...
2014-06-13
850 reads
I’m leaving early afternoon for the longish drive to South Florida for SQLSaturday tomorrow. The schedule looks impressive! I missed...
2014-06-13
551 reads
As a quick script tip for today I’ll show you a script I use regularly for reporting purposes.
It shows you the...
2014-06-13
421 reads
It’s Friday, time to look back at the most popular RealSQLGuy posts of the week. Because it’s Friday and you’re...
2014-06-13
444 reads
As a quick script tip for today I'll show you a script I use regularly for reporting purposes.
It shows you the...
2014-06-13
18,140 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