T-SQL Tuesday #050: Automating Database Restores
Here it is time for the party of the month for the SQL Server acolytes and I was running a bit behind. Why? Well, that was due in part...
2014-01-14
8 reads
Here it is time for the party of the month for the SQL Server acolytes and I was running a bit behind. Why? Well, that was due in part...
2014-01-14
8 reads
Here it is time for the party of the month for the SQL Server acolytes and I was running a...
2014-01-14
696 reads
I was a bit sad to see that Google bought Nest. I like upstarts that see a problem and solve...
2014-01-14
636 reads
The cached MSI file ‘C:\Windows\Installer\<name>.msi’ is missing !!! This is one error which you don’t want to see when you are...
2014-01-14
1,216 reads
It’s time once again for that monthly geek party again we like to call T-SQL Tuesday. T-SQL Tuesday #50 is...
2014-01-14
1,008 reads
T-SQL Tuesday is a monthly blog party hosted by a different blogger each month.
T-SQL Tuesday 50 – Automation
This blog party was...
2014-01-14
833 reads
TweetG’day,
Well, it’s the first TSQL-Tuesday of 2014 and one of my New Years resolutions for 2014 is to contribute to...
2014-01-14
1,313 reads
I spent some time this month to true up the SQL Server 2005 version, with the other versions for the...
2014-01-14
1,079 reads
It’s a little less than two weeks until SQL Saturday #271 – Albuquerque. The second event in that great city, and...
2014-01-14
803 reads
I was recently just letting my mind wander. As it’s prone to do, all sorts of things just entered into...
2014-01-14
787 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