Fixing logins
I ran into an issue recently where I couldn’t get a Windows login to work with some application software. This...
2018-01-10
443 reads
I ran into an issue recently where I couldn’t get a Windows login to work with some application software. This...
2018-01-10
443 reads
Have you ever downloaded a script from an internet site, only to find that there are extra blank lines between...
2018-01-10
463 reads
A year ago, I wrote in a post that cloud computing is just someone else’s data center. I was wrong. Whether...
2018-01-10
374 reads
Awhile back, if you are on Twitter, you can probably recall my ranting about the 949 indexes I was reviewing....
2018-01-10
1,726 reads
This post is by Chris Gibson
I recently wanted to exclude some temporary SQL databases from being discovered by our SCOM...
2018-01-10
1,373 reads
Last week I was working on a couple of SQL instances that contained databases which were part of an Always...
2018-01-10
495 reads
The challenge at hand - conquering that technical problem and getting that high associated with the metaphorical high of summiting a tough task.
Related Posts:
Summiting that Technical Challenge Part II...
2018-01-10
6 reads
Conquering Challenges
I really like the topic of the TSQLTuesday party today. Today we have been instructed in no uncertain terms...
2018-01-19 (first published: 2018-01-10)
1,082 reads
Hello!
Very recently a user of salt got in touch with me about a bug when setting the job schedules up...
2018-01-09
255 reads
How can you tell what version of TLS is currently used for client connections? Unfortunately there isn't a handy queryable column...
2018-01-09
2,494 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