T-SQL Tuesday #040: File and Filegroup Wisdom
Backstory
Each month the SQL community comes together for an important party. This is the blog party that was the brain...
2013-03-12
1,079 reads
Backstory
Each month the SQL community comes together for an important party. This is the blog party that was the brain...
2013-03-12
1,079 reads
Backstory Each month the SQL community comes together for an important party. This is the blog party that was the brain child of Adam Machanic (Twitter) known as T-SQL Tuesday....
2013-03-12
12 reads
Another month and we have another installment (meeting) for the Data Professionals of the Las Vegas area.
This month we will...
2013-03-11
903 reads
Another month and we have another installment (meeting) for the Data Professionals of the Las Vegas area. This month we will be getting back on schedule with the usual...
2013-03-11
8 reads
You have been doing a fantastic job of late. You have all of your databases being backed up on a...
2013-02-12 (first published: 2013-02-11)
1,651 reads
I know it is right in the middle of TSQL2SDAY when this post is to go live. If you don’t...
2013-02-12
616 reads
I know it is right in the middle of TSQL2SDAY when this post is to go live. If you don’t know what that is, you should go check out...
2013-02-12
11 reads
You have been doing a fantastic job of late. You have all of your databases being backed up on a regular schedule. Now you get an alert that your...
2013-02-11
9 reads
This is part I of III in a series on the physical join operators in SQL Server.
2013-02-01 (first published: 2011-01-04)
26,793 reads
Do you know the last time a Server Property was changed on your instances of SQL Server?
Are you wondering when...
2013-01-30 (first published: 2013-01-24)
4,254 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