Odds and Ends To Think About
Got this in morning email from Khan Academy. Not sure if I agree that we all can learn anything, but...
2014-08-22
585 reads
Got this in morning email from Khan Academy. Not sure if I agree that we all can learn anything, but...
2014-08-22
585 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-08-22
382 reads
I don’t mind saying that amyotrophic lateral sclerosis (ALS), also known as Lou Gehrig’s disease, scares me. A degenerative disease...
2014-08-21
1,239 reads
Thanks for attending my session today, SQL Server Permissions and Security Principals at 9:15AM!
Here's the link to a .zip file to...
2014-08-21
550 reads
Thanks for attending my session today SQL Server Admin Best Practices with DMVs at 8AM!
Here's the link to a .zip file...
2014-08-21
580 reads
Busy week, should have blogged about it before the eventDid a remote presentation on securing credit card dataFirst time using...
2014-08-21
503 reads
I just spent a few minutes reviewing the 2015 PASS budget, things that I noticed:
Anticipating a change in revenue of...
2014-08-21
733 reads
After quite a while it has finally returned: another Stupid Me™®©! A reminder:
Every time I do something “stupid”, which happens...
2014-08-27 (first published: 2014-08-21)
7,377 reads
One of the biggest headaches in most development groups that do any sort of SQL Server work is that of...
2014-08-21
949 reads
In some of my previous posts, I have talked about how to create Columnstore indexes. Now I’d like to discuss...
2014-08-21
2,347 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