RAID your backups
Let’s start with a very brief definition of some RAID levels.
RAID 0 : Stripe your data across multiple disks. Writing a...
2016-05-24 (first published: 2016-05-16)
1,484 reads
Let’s start with a very brief definition of some RAID levels.
RAID 0 : Stripe your data across multiple disks. Writing a...
2016-05-24 (first published: 2016-05-16)
1,484 reads
I’ve been working on tuning a query for the last week and I’ve had to make several changes to the...
2016-05-16 (first published: 2016-05-12)
3,582 reads
One of the things I like best about joining in on Adam Machanic’s (b/t) TSQL Tuesday blog party is that...
2016-05-10
503 reads
It always amazes me how often these three commands get confused. Heck it amazes me how long I confused them....
2016-05-04
1,111 reads
You have a database with one or more filegroups, and one or more of those filegroups has multiple files. You’ve...
2016-05-02
1,666 reads
Oh Noes! I have a job that requires me to run an SSIS package, cmdshell script, etc. And I need...
2016-04-27
2,629 reads
I’m a big fan of certifications as a training exercise. However not everyone has the same interests. With the new...
2016-04-25
1,838 reads
Me: I think I’m going create a new playground instance.
Myself: Make sure you use a case sensitive (CS) collation when...
2016-04-20
420 reads
Everyone makes mistakes right? And sometimes you create an object and decide later that you messed up and need to...
2016-04-18
476 reads
I love this somewhat obscure mathematical operator. All it does is return the remainder of a division statement but even...
2016-04-14
507 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