Increasing and decreasing the performance level of your Azure SQL Database
One of the big benefits of Azure, and in fact any of the cloud offerings I’ve seen, is the ability...
2017-03-29
736 reads
One of the big benefits of Azure, and in fact any of the cloud offerings I’ve seen, is the ability...
2017-03-29
736 reads
It’s been almost 3 years since I updated these SPs! I can’t believe so much time has gone by! Well,...
2017-03-27
513 reads
I was working on a blog post this weekend that required a list of random numbers. Now, this isn’t exactly...
2017-04-05 (first published: 2017-03-22)
2,355 reads
Any object within a database in SQL Server has what is called a four part name. Which rather implies four...
2017-03-20
377 reads
Compressing your backups has very few downsides. It’s usually faster (the additional time for compression is less than the time...
2017-04-03 (first published: 2017-03-16)
1,677 reads
It’s that time again. Kennie Nybo Pontoppidan (b/t) is the host this month and has a fun topic for us....
2017-03-27 (first published: 2017-03-14)
1,136 reads
My company has recently adopted a Cloud first attitude. Now that’s different from Microsoft’s Cloud first. Microsoft is putting new...
2017-03-08
516 reads
Recently, Aaron Bertrand (b/t) posted Performance Surprises and Assumptions : GROUP BY vs. DISTINCT. In it he says he prefers GROUP...
2017-03-06
2,444 reads
One of the most common ways to get an event notification is by email. So what happens when you get...
2017-03-01
389 reads
These are those queries where you are pulling for, let’s say, a first name, a last name, a state, and/or...
2017-03-06 (first published: 2017-02-27)
3,551 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