Cool Windows 8 Blog
For those of you interested in cool new technology, you should definitely check out ?Building Windows 8? which is a...
2011-11-11
905 reads
For those of you interested in cool new technology, you should definitely check out ?Building Windows 8? which is a...
2011-11-11
905 reads
Last week, Microsoft announced some pretty fundamental changes in how SQL Server 2012 will be licensed compared to previous versions...
2011-11-11
5,573 reads
Hey folks,
Welcome back to the PASS election process. The process moves forward with all of us candidates awaiting our ranking...
2011-11-10
873 reads
Feed Me Seymour!
Welcome to your number one cost. Every budget I’ve looked at so far food is the top expense...
2011-11-10
1,181 reads
When I was a kid, my mom had an old cookie-tin in which she kept her sewing supplies. On the...
2011-11-10
1,273 reads
A lot of my work right now involves going to meetings. A few of them are ones I host, a...
2011-11-10
623 reads
Here is a simple yet annoying error I ran into while creating a dataset. Below is the query that I...
2011-11-10
2,211 reads
Quick notes as it is already Thursday!
The speaker party went well. Well attended, I spent a lot of time chatting...
2011-11-10
556 reads
Introduction
Triggers can be defined as the database objects which perform some action for automatic execution whenever users try to do execute...
2011-11-10
1,268 reads
DBAs find it easier to manage large Database Server environments when checklists are used. This Stored procedure checklist will stimulate...
2011-11-10
3,006 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