Database jokes
Sometimes when work is tough you simply need to take your eyes and mind away from your working console. Jokes are one...
2014-07-18
1,317 reads
Sometimes when work is tough you simply need to take your eyes and mind away from your working console. Jokes are one...
2014-07-18
1,317 reads
If you want a quick way to determine which format, or style, to specify when converting a datetime value in SQL to a character data type, you can use...
2014-07-18
50 reads
If you want a quick way to determine which format, or style, to specify when converting a datetime value in...
2014-07-18
696 reads
I was doing some work on the marketing for SQLSaturday Orlando and looked back at the messages we sent last...
2014-07-18
627 reads
I wrote What Is the Hardest Feature to Learn About SQL Server? not really knowing what answer to expect. So...
2014-07-18
1,132 reads
Photo credit – Mike Lynch
A good cure to a creepy doll is a good old post that is still useful. In...
2014-07-18
429 reads
Sometimes when work is tough you just need to take your eyes and mind away from your working console. Jokes are...
2014-07-18
6,279 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-07-18
330 reads
Every now and again I find myself working with SSIS for one reason or another. Every now and again I find myself fighting with SSIS because it provides less...
2014-07-17
53 reads
Every now and again I find myself working with SSIS for one reason or another. Every now and again I...
2014-07-25 (first published: 2014-07-17)
32,425 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