There needs to be a win
A while back a company I worked for had two teams. One was a development team and the other was ... Continue reading
2020-03-19
116 reads
A while back a company I worked for had two teams. One was a development team and the other was ... Continue reading
2020-03-19
116 reads
When it comes to migrating applications to Azure, there are a number of paths available. But if you’re migrating on-premises ... Continue reading
2020-03-25 (first published: 2020-03-17)
303 reads
After my post last month about configuring your tools I’ve been on a make my life easier kick and one ... Continue reading
2020-03-13 (first published: 2020-03-04)
2,702 reads
A little while back we tried configuring the instance. Sometimes though, instance settings are a bit heavy handed, so this ... Continue reading
2020-03-05 (first published: 2020-03-02)
471 reads
DBA, a job, a vital job. T-SQL a language that is fun. Select, a query to get some data. From, ... Continue reading
2020-02-26
29 reads
When I’m working with a tool I like a clean startup. And by that I mean don’t automatically open anything. ... Continue reading
2020-03-03 (first published: 2020-02-24)
172 reads
The other day I saw a weird option for the UPDATE command in a stack overflow answer. Basically it looked ... Continue reading
2020-03-02 (first published: 2020-02-19)
1,935 reads
I realized in my last #PowershellBasics post that I was talking about running a file and passing in an optional ... Continue reading
2020-02-25 (first published: 2020-02-17)
567 reads
I dislike the term Politically Correct. Not because the original idea of it is a bad one, but it’s been ... Continue reading
2020-02-13
68 reads
Happy T-SQL Tuesday! Thanks for hosting this month Jess Pomfret (blog|twitter) and great topic. Life Hacks. There is one thing ... Continue reading
2020-02-18 (first published: 2020-02-11)
649 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