Doing DevOPs for your Database? You need to start here…
I’ve been doing that thing called DevOPs for about 17 years – you know – before it had a name…
In fact it...
2018-02-28
1,272 reads
I’ve been doing that thing called DevOPs for about 17 years – you know – before it had a name…
In fact it...
2018-02-28
1,272 reads
SQL Server 2017 introduces a set of useful functions like STRING_AGG(), STRING_SPLIT(), TRIM()… and many more. In this tip, I am...
2018-02-28
9,381 reads
I tend to work in the US English world. I’m somewhat embarrassed to note that I really only know one...
2018-02-27
473 reads
I was surprised to find out that a lot people hadn’t heard about the new join type, Adaptive join. So,...
2018-02-27
1,153 reads
You need something from the database admin. Maybe it’s permissions, maybe it’s code troubleshooting, or maybe it’s just that the database is...
2018-02-27
511 reads
Planning to Increase Cost Threshold for Parallelism
When administrating a SQL Server instance with multiple CPU cores and heavy workload, it’s...
2018-02-27
1,159 reads
Productivity is hard to measure when your work has no definite structure like a typical office job. You may operate...
2018-02-27
474 reads
There are times when you are writing a query while referencing another piece of information: the results of another query,...
2018-02-27
291 reads
There are times when you are writing a query while referencing another piece of information: the results of another query, a variable value, a webpage, etc...
If using two monitors...
2018-02-27
24 reads
If you’ve ever spent any time looking at execution plans you will have almost definitely noticed all the read counts...
2018-02-27
104 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