save disk when doing backup
As a DBA, most of us will also take care of test environment. However test servers usually cannot afford to...
2007-11-11
396 reads
As a DBA, most of us will also take care of test environment. However test servers usually cannot afford to...
2007-11-11
396 reads
Work responsibilities took up my time on Thursday and Friday, so I never got around to posting. Here's the resources...
2007-11-11
631 reads
There was a time that I avoided bcp utility like the plague. A few years ago, we needed to set...
2007-11-09
645 reads
We (End to End Training) will be hosting our Celko on SQL seminar tomorrow (Nov 9th). It's not too late...
2007-11-07
696 reads
Apex SQL has announced a new version of Apex SQL Log as well as an API for it.
Release Notes...
2007-11-07
796 reads
I happened to get an email asking me to vote for a product that was being featured in one of...
2007-11-07
668 reads
Building upon my post from last Tuesday, if you know all the roles for a given user, you'll probably want...
2007-11-06
620 reads
Had an interesting debate with Andy Warren on the tuning editorial today. I'm not sure we agree completely, but it's...
2007-11-05
710 reads
I was just reading the October 2007 issue and they have done what magazines are apt to do; redesign themselves...
2007-11-05
611 reads
I try my best to get things right the first time. So often, correcting a mistake or bad choice is...
2007-11-05
694 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