“How do I contribute to dbatools?” with Drew Furgiuele
This weekend I caught up with Drew Furgiuele at SQL Saturday Cleveland and learned how to get involved with the...
2018-02-06
114 reads
This weekend I caught up with Drew Furgiuele at SQL Saturday Cleveland and learned how to get involved with the...
2018-02-06
114 reads
Watch this week's video on YouTube
This weekend I caught up with Drew Furgiuele at SQL Saturday Cleveland and learned how to get involved with the open-source dbatools PowerShell module.
If...
2018-02-06
12 reads
If you are using SSMS V17.4 as I am
You may encounter a weird error. This can be repeated as follows:
Open...
2018-02-06
513 reads
In December I participated in T-SQL Tuesday #97 and wrote a post about 2018 goals. I promptly spent two weeks...
2018-02-05
398 reads
Wait statistics are a vital part of understanding what is causing your system to run slowly. Capturing them can be...
2018-02-14 (first published: 2018-02-05)
2,738 reads
This month let’s create some security!
Create logins: GUI 5 pts/Script 5 pts
Create a SQL login and a Windows authenticated login....
2018-02-05
311 reads
The Importance of Log Files in SQL Server
On the SQL server every day we perform many transactions and as we...
2018-02-05
3,464 reads
I’ve been incredibly lucky in my career. I’ve somehow managed to meet and become friends with highly talented people who...
2018-02-05
338 reads
I need a new social media profile picture.
That’s one of the most important (non-technical) conclusions I drew from my week at PASS Summit 2017. It seemed like everywhere I...
2018-02-05
10 reads
(2018-Feb-04) I've had a case working with very large data files as a source for my heat map visualizations in...
2018-02-04
730 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