SQL Saturday
I've just received notice that I will be a presenter at the upcoming SQL Saturday event in Jacksonville, Florida. I'll...
2008-03-30
1,538 reads
I've just received notice that I will be a presenter at the upcoming SQL Saturday event in Jacksonville, Florida. I'll...
2008-03-30
1,538 reads
I was following a debate on the new Merge syntax in SQL Server 2008 with interest. It was somewhat of...
2008-03-28
1,519 reads
"Select *" is bad. Everyone knows it, but everyone still uses it. I use it. Most of the time it is...
2008-03-28
1,453 reads
Who's bad?
"Select *" is bad. Everyone knows it, but everyone still uses it. I use it. Most of the time it...
2008-03-28
1,538 reads
SDTimes has an article up about Debunking Cyclomatic Complexity that talks about the results of some research that supports what I...
2008-03-28
1,518 reads
How do you know what procedures are cached in SQL Server? Simple, just ask, and SQL Server will tell you.You...
2008-03-28
1,485 reads
At the recent Orlando Code Camp I had the opportunity to spend a good bit of time discussing LINQ to...
2008-03-26
1,677 reads
I recently ordered a new laptop and this one came with Windows Vista Ultimate. I knew about having to install...
2008-03-26
2,754 reads
I've blogged about the OLPC project a couple times already, not as a political statement but just as a fascinating...
2008-03-24
1,381 reads
Although attendance was down this year (around 280 attendees) due to it being held Easter weekend, I thought this was...
2008-03-23
1,462 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