T-SQL Tuesday #096: Inspiration Abounds
Who Inspires You?
Today is a bit of a divergence from the usual geekery that may abound on my blog. As...
2017-11-15
437 reads
Who Inspires You?
Today is a bit of a divergence from the usual geekery that may abound on my blog. As...
2017-11-15
437 reads
For me, this is about much more than just a story or two about people that have impacted me in my career choices. This topic is also about much...
2017-11-15
10 reads
An often under utilized or maybe even mis-utilized feature of SQL Server is a database object schema. In the event of...
2017-11-09 (first published: 2017-10-27)
2,273 reads
Halloween is a great time of year. It is unfortunate that it is just one day of the year. That...
2017-11-01
460 reads
The undead of Halloween are now upon us. Among the hordes of data zombies roaming the streets in lab-coats and fishnet stockings, few of us are still scrambling to...
2017-11-01
8 reads
From time to time it is necessary to find a way into an SSIS package that is password protected. This article will help you find your way in to...
2017-10-30
52 reads
A recurring theme over the past several weeks (there are always recurring themes it seems) has been an issue that...
2017-10-30
1,365 reads
An often under utilized or maybe even mis-utilized feature of SQL Server is a database object schema. In the event of the latter, there is an occasional requirement for change.
Related...
2017-10-27
23 reads
Free workshop on SQL Server leading up to Summit 2017 that will provide attendees an alternate means to increase affordable learning opportunities during the week.
Related Posts:
Seattle SQL Pro Workshop...
2017-10-26
8 reads
Seattle SQL Pro Workshop 2017
You may be aware of an event that some friends and I are putting together during...
2017-10-26
399 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