Minimizing Cloud cost
The cloud can be expensive. I had this hammered home the other day by a simple mistake. I’m currently working...
2016-06-27 (first published: 2016-06-20)
1,481 reads
The cloud can be expensive. I had this hammered home the other day by a simple mistake. I’m currently working...
2016-06-27 (first published: 2016-06-20)
1,481 reads
Help! I backed up my database yesterday and the backup file was about 200MB but today it’s closer to 400!...
2016-06-16
605 reads
This month my friend Michael J Swart(b/t) would like us to talk about the new 2016 version of SQL Server....
2016-06-20 (first published: 2016-06-14)
3,364 reads
I did a post the other day on comparing two tables. It was meant as a general overview but I...
2016-06-08
489 reads
Many years ago during an interview I was asked to “Name the top 7 DBCC commands that you use.” I...
2016-06-06
1,427 reads
I was reading someone’s question the other day on StackExchange and while the existing comments/questions solved the OP’s (original poster)...
2016-06-10 (first published: 2016-06-02)
4,642 reads
I really do. There is a joke that DBAs say no to everything and there is some truth to that....
2016-05-31
757 reads
Recently I created my first Azure SQL Database. But now I need to connect to it.
You can connect using...
2016-05-25
552 reads
There is a highly useful system view called sys.master_files. If you’ve never encountered it before it returns a list of...
2016-06-01 (first published: 2016-05-23)
1,589 reads
I was reading a blog post from my friend Randolph West (b/t) on Best Practices and a thought struck me.
Starting...
2016-05-18
478 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