2023-08-09
416 reads
2023-08-09
416 reads
I had a client ask about how to deal with encrypted stored procedures in their database. This post looks at how to find them and I’ll have future posts...
2023-08-09
321 reads
Steve has a few thoughts on a rant about Stack Overflow. An experienced developer thinks much of their information is wrong and things are getting worse.
2023-08-09
365 reads
This T-SQL Tuesday is from a new host, Josephine Bush, leader of the Boulder group just North of me. It’s an interesting invitation, asking what our job titles really...
2023-08-08
222 reads
The start of learning at the 2023 PASS Data Community Summit is 100 days away. I checked. The Summit starts for many of us on Monday with precons or...
2023-08-07
50 reads
Microsoft Fabric changes the paradigm for how you might store data in your warehouse.
2023-08-07
245 reads
2023-08-07
367 reads
idlewild – adj. feeling grateful to be stranded in a place where you can’t do much of anything, which temporarily alleviates the burden of being able to do anything...
2023-08-04
34 reads
I had to test something for a customer, and as a part of this there as a need to have a different default schema for a user. I wrote...
2023-08-04 (first published: 2023-07-19)
271 reads
New research says that companies with flexible work policies, hybrid or remote, find they are able to hire staff more quickly.
2023-08-04
109 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