TSQL Challenge 63 – Update
If you recall, I like Sudoku. I even posted a script for solving it via TSQL. I went so far as to enter my script into a TSQL Challenge....
2011-11-14
19 reads
If you recall, I like Sudoku. I even posted a script for solving it via TSQL. I went so far as to enter my script into a TSQL Challenge....
2011-11-14
19 reads
If you recall, I like Sudoku. I even posted a script for solving it via TSQL. I went so far...
2011-11-14
1,040 reads
You run into this error when using sys.dm_db_index_physical_stats DMV on a database which is running under SQL Server 2000 (80)...
2011-11-14
1,885 reads
Here is something else that started in Florida (doesn’t everything?), a series of events along the lines of Code Camp...
2011-11-14
586 reads
The Merriam-Webster site has an interesting list of Top 10 Lists, ranging from commonly confused words to things you didn’t...
2011-11-14
649 reads
The work I’m doing right now has nothing to do with SQL Server, and while it deals with technology, it’s...
2011-11-14
698 reads
Managing SQL Server security changes in mass is something which screams automate it. Let’s look a at few examples using...
2011-11-14
1,670 reads
I sit here in a hotel room as I reminisce on this past weekend. This last weekend began with a red-eye trip from Salt Lake to New York. The...
2011-11-14
13 reads
I sit here in a hotel room as I reminisce on this past weekend. This last weekend began with a...
2011-11-14
547 reads
This blog entry is a short post-event follow-up for all our followers and attendees at the event! I will have...
2011-11-14
1,020 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