2025-11-23
28 reads
2025-11-23
28 reads
This topic keeps coming up with my customers so the purpose of this blog post is to keep all the useful information in one post. Think of this post...
2024-10-23 (first published: 2024-10-09)
200 reads
Cosmos DB has become my latest focus and I hope to start sharing more about ways you can use it. Cosmos DB doesn’t provide the same granularity of query...
2023-11-29 (first published: 2023-11-15)
262 reads
So it’s about a week after SQL Saturday Chicago 2019. The event was amazing, tons of great people and in a great venue. Here’s the details of what happened...
2019-04-15 (first published: 2019-04-01)
620 reads
My presentation so far is really rough. I need to improve a lot before SQL Saturday Chicago! For now, the...
2019-03-20
1,040 reads
This is a trick I use in SQL Server Management Studio at least once a week.
Today’s scripts will be screenshots...
2019-03-18 (first published: 2019-03-02)
3,210 reads
This is a series I’m writing as I prepare for SQL Saturday Chicago 2019. My session is called Performance tuning...
2019-03-18
344 reads
I’m taking a brief break from daily blogging, even though it has been a ton of fun.
No excuses
I hope...
2019-03-11
237 reads
Happy Friday! We made it. Here’s something I came across while testing optimize for ad hoc for this week’s blog...
2019-03-11 (first published: 2019-02-22)
2,153 reads
Here’s some of my favorite community scripts and how I like to run them. If you haven’t tried the optional...
2019-03-09
709 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...
Nitazoxanide 500 mg Buy Online is a search term used by people looking for...
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...
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