2023-08-04
472 reads
2023-08-04
472 reads
A friend asked me for some travel tips and ideas recently. One of their questions was on what types of things do I actually carry on the road, both...
2023-08-03
39 reads
2023-08-02
421 reads
There is a company trying to build AI systems in a new way. Steve isn't sure what this means or if it's a good idea. Read his thoughts today.
2023-08-02
224 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. Since this...
2023-07-31 (first published: 2023-07-12)
292 reads
At Redgate Software, we've been trialing Copilot from GitHub with our developers. I managed to get access for this experiment and have tried a few things, though I'm not sure I've found it very useful. I'll continue to work with Copilot, but for now, I just don't find Copilot AI helping me with the types […]
2023-07-31
236 reads
2023-07-31
535 reads
fitzcaraldo – n. a random image that becomes lodged deep in your brain – maybe washed there by a dream, or smuggled inside a book, or planted during a...
2023-07-28
37 reads
Earlier this week the emails went out to speakers who submitted to the PASS Data Community Summit 2023 conference. These were acceptances and rejections, letting people know the results...
2023-07-28 (first published: 2023-07-13)
163 reads
Reviewing Pull Requests (PR) is something that developers should take seriously, but Steve doesn't think this always happens.
2023-07-28
373 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