Change the name of master database files – SQL Server on Linux
In my recent blog, I discussed about how to move master database to another location. One of the readers requested...
2018-02-26
755 reads
In my recent blog, I discussed about how to move master database to another location. One of the readers requested...
2018-02-26
755 reads
I see a lot of posts online about rebuilding indexes in a scheduled maintenance task, this is a pretty intensive...
2018-02-25
94 reads
Problem
We need a way to collect performance metrics for all our SQL Servers (Windows and Linux) into one system and...
2018-02-24
4,910 reads
My Surface Book (gen 1) recently did updates and then a day or so later the keyboard and trackpad mysteriously...
2018-02-24
460 reads
If the new “CLR strict security” Server-level configuration option in SQL Server 2017 hasn’t caused enough confusion and pain, then,...
2018-02-23
1,403 reads
This week, I was pretty pumped to see that PASS published Erin Stellato (twitter) and Dejan Krakovic’s (linked in) excellent session on Query Store to the public. I attended...
2018-02-23
18 reads
You never know when the idea for a script will make an appearance.
I had to work with composite primary keys...
2018-03-08 (first published: 2018-02-23)
3,587 reads
I started using a MacBook Pro at work, and the very first thing I did was configure SQL Server 2017 running on a docker container, and run it locally...
2018-02-23
39 reads
I started using a MacBook Pro at work, and the very first thing I did was configure SQL Server 2017...
2018-02-23
568 reads
With the release of SQL Server 2017 CU4, you can use the mssql-conf utility to move the master database file...
2018-03-07 (first published: 2018-02-23)
2,099 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