On the Importance of Documentation...
It seems that I keep inheriting old systems that provide a singular, albeit mission critical, function to their owners. In...
2008-01-09
548 reads
It seems that I keep inheriting old systems that provide a singular, albeit mission critical, function to their owners. In...
2008-01-09
548 reads
Spotted this on the Webware feed, Earth Class Mail is a service that opens and scans your regular mail so...
2008-01-09
503 reads
Many posts including this one about as many as 70,000 sites being hacked using SQL injection and a vulnerability in...
2008-01-09
637 reads
Part looks at using views for partitioning, still a valid technique even in the SQL 2005 world. I added in...
2008-01-08
264 reads
If you happen to read ACM Queue there is a great article in the Nov/Dec 2007 issue called 'A Conversation...
2008-01-07
285 reads
I finally got set up to access the MVP newsgroup server today while I was working on some other projects....
2008-01-06
802 reads
A friend sent me a link to www.sqlcommunity.com and I think I'd list it. So far doesn't seem impressive, but...
2008-01-06
519 reads
Just a reminder to anyone in the Tampa area, or willing to travel, that the call for speakers for the...
2008-01-03
242 reads
Back in 2000 I began writing for swynk.com in hopes of learning more about SQL Server and beginning to make...
2008-01-03
6,202 reads
After a couple of months of discussion, End to End Training has scheduled me to teach a two day beginning...
2008-01-03
476 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