DBA Myths: You can only restore one differential backup
Ok, I know I’m hosting T-SQL Tuesday this month but I still had post I wanted to share.
The basic steps...
2016-12-13
475 reads
Ok, I know I’m hosting T-SQL Tuesday this month but I still had post I wanted to share.
The basic steps...
2016-12-13
475 reads
I’ve been really excited about the new Data Migration Assistant (DMA) since I first heard about it. One of the...
2016-12-08
772 reads
Come on down! You’re the next contestant on T-SQL Tuesday! I’m your host Kenneth Fisher and this month I’d thought...
2016-12-06
555 reads
I recently wrote an article for SQL Server Central about using OUTPUT. In case you aren’t aware OUTPUT is a...
2016-11-30
719 reads
If you ask a senior DBA what are the top 5 most important commands in T-SQL you’ll probably see DBCC...
2016-12-05 (first published: 2016-11-28)
2,493 reads
I while back as part of a T-SQL Tuesday post I created HAL0001, then later HAL0002 with a long-term goal...
2016-11-23
484 reads
Sometimes loading new data or even changes into a table just isn’t going to work. You need a complete reload....
2016-11-28 (first published: 2016-11-21)
2,908 reads
SQLSkills is an amazing resource for the SQL Server community. Between their blogs, white papers, and the SQLSkills Insider emails...
2016-11-16
680 reads
SQL Server stores a create date and a change date for each object in the sys.objects system view.
Unfortunately while...
2016-11-21 (first published: 2016-11-14)
2,128 reads
First I guess we had best start with definitions right? The permission Administer Bulk Operations and the role bulkadmin are...
2016-11-14 (first published: 2016-11-10)
2,337 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