SQL University: Introduction to Indexes, Part the Second
Welcome once more to the Miskatonic branch of SQL University. Please try to concentrate. I realize the whipoorwills singing outside...
2010-07-21
680 reads
Welcome once more to the Miskatonic branch of SQL University. Please try to concentrate. I realize the whipoorwills singing outside...
2010-07-21
680 reads
Right, all eldritch tomes are to be closed and Elder Signs are to be put away during this course.
Welcome to...
2010-07-19
760 reads
For some crazy reason (probably everyone is on vacation), Jorge Segarra (blog|twitter) who runs SQL University has asked me to...
2010-07-16
553 reads
I couldn’t hide the lead. Steve Jones (blog|twitter) has announced he’s running for the PASS board. I’m excited. I’m almost as...
2010-07-16
949 reads
The July meeting for the Southern New England SQL Server Users Group is tonight. Andrew Novick will be talking about...
2010-07-14
808 reads
You just have to love Red Gate tools. They find the small area that they want to cover and then...
2010-07-14
1,884 reads
It’s a Friday, the day governments & companies traditionally deliver bad news. I recived the bad news earlier in the week,...
2010-07-09
725 reads
I’m still trying to learn PowerShell better. The opportunity to answer simple questions and problems with the tool is hard...
2010-07-06
1,201 reads
I’m working with PowerShell, and digging it. I decided that I wanted to create a new script (blog post later,...
2010-06-30
2,095 reads
I’ve had the opportunity this week to take class with Don Jones (blog | twitter), PowerShell guru and author of PowerShell...
2010-06-25
2,110 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