SQLSaturday Finally Has a Logo
Sometimes its the little things that seem to take forever! We've had a text only logo up for a while,...
2007-10-31
1,447 reads
Sometimes its the little things that seem to take forever! We've had a text only logo up for a while,...
2007-10-31
1,447 reads
Picked this up from the local Net group here in Orlando. INETA is actually pretty helpful when it comes to...
2007-10-31
1,421 reads
Some time ago I was looking for a password vault and came across some recommendations for KeePass. KeePass is open...
2007-10-31
2,631 reads
If exists is a well known way to improve performance because it returns as soon as it matches a single...
2007-10-30
1,976 reads
SQL Server 2005 introduces Common Table Expressions (CTEs), which are great for recursive queries. Previously, in order to do recursion,...
2007-10-30
2,580 reads
After a few meetings of oPASS this year the numbers I use are 2 slices of pizza and 2 drinks...
2007-10-29
1,458 reads
A recent thread on SQLServerCentral.com had an individual what it took to be a successful DBA. Couple that with a...
2007-10-29
1,683 reads
For a variety reasons, including personal/family concerns and workload, I've not been able to write as often as I'd like....
2007-10-28
1,473 reads
This went up today and there is one great comment about possibly using snapshot isolation as an alternative to the...
2007-10-25
1,368 reads
I've been following Steve's exploits trying to learn the podcasting business and we usually talk about it once a week...
2007-10-25
1,466 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