2017-03-03
2017-03-03
I decided to accept Grant’s (TheScaryDBA) challenge found here- http://www.scarydba.com/2017/03/02/random-blog-post-challenge/ where we have to write a technical blog post that incorporates a certain...
2017-03-03
342 reads
Apologies for the overly acronym-laden title as I was trying to keep it concise but descriptive. And we all know...
2017-03-03
627 reads
Maintaining a database is an important job of the DBA role. One of the many maintenance tasks is ensuring that...
2017-03-03
480 reads
Fun week, lot’s of things going on and throughout I’ve been reading…
Windows Server Premium Assurance and SQL Server Premium Assurance
Microsoft...
2017-03-03
346 reads
I suspect this may make a few people angry, but I felt the need to share.
I was recently asked to...
2017-03-03 (first published: 2017-02-24)
3,365 reads
The cloud has evolved. Just a few years ago, cloud-based applications were the exception rather than the rule, and on-premises...
2017-03-03 (first published: 2017-02-24)
2,210 reads
Just wanted to put a quick post out there for the people who follow me. I very recently made a...
2017-03-03
362 reads
This question gets asked a lot and reoccurs over the years. Do you need a degree to be DBA? I have seen...
2017-03-02
438 reads
Stupid question… what's the schema of a table with sys.sp_readerrorlog output? Well you might be surprised if you're used to...
2017-03-02
143 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