T-SQL Tuesday #47: My Best SQL Server SWAG
This blog post is part of T-SQL Tuesday, a monthly SQL blog party with a rotating host and common topic....
2013-10-08
1,224 reads
This blog post is part of T-SQL Tuesday, a monthly SQL blog party with a rotating host and common topic....
2013-10-08
1,224 reads
The Stuff We All Get!
Fall has arrived which means it's conference season: Connections is happening this week, the PASS Summit...
2013-10-07 (first published: 2013-10-03)
1,680 reads
Another PASS Board of Directors election cycle has come and gone, and with the results now announced I'd like to...
2013-10-02
854 reads
To make things easier on speakers prior to a SQLSaturday organizers are encouraged to print & cut their SpeedPASSes ahead of...
2013-09-19
1,407 reads
If you like free SQL Server training you're in luck – starting at 12:00 PM GMT/8:00 AM EDT, July 31 (that's...
2013-07-30
1,346 reads
We all know that we should document our SQL Servers, right? RIGHT?
So let's say you had some time on...
2013-04-24 (first published: 2013-04-11)
3,816 reads
A quick note to let you know that SQL Power Doc version 1.0.1.0 is now live. This release fixes issues...
2013-04-24
1,039 reads
This blog post is part of T-SQL Tuesday, a monthly SQL blog party with a rotating host and common topic....
2013-04-09
965 reads
This blog post is part of T-SQL Tuesday, a monthly SQL blog party with a rotating host and common topic....
2013-02-12
2,058 reads
During the last few years I've worked extensively with transactional replication and have written a handful of scripts that have...
2013-02-05 (first published: 2013-01-29)
2,766 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