Buzzword Bingo
Grant Fritchey (b/t) is our host for T-SQL Tuesday this month and surprise surprise he’d like to talk about DEVOPS....
2017-06-13
980 reads
Grant Fritchey (b/t) is our host for T-SQL Tuesday this month and surprise surprise he’d like to talk about DEVOPS....
2017-06-13
980 reads
If you’ve worked much with named instances you’ve probably had to deal with the question “What port is that instance...
2017-06-07
546 reads
Yes, I spelled that correctly. NUL not NULL. NUL is basically a location you can send a backup to. In...
2017-06-05
7,403 reads
I thought I’d do another crossword. Enjoy! If you need any help with it feel free to let me know...
2017-06-16 (first published: 2017-05-31)
2,809 reads
I read an interesting question today. Someone wanted to be able to run the same stored procedure multiple times, at...
2017-06-08 (first published: 2017-05-24)
10,213 reads
In my last post on partitioning I used the $Partition command in passing. I’ve been thinking it deserves a bit...
2017-05-22
508 reads
I was looking around for something to write about this evening and came across one of Russ Thomas’ (b/t) old...
2017-05-17
2,874 reads
TL;DR: It’s pretty pointless and can cause performance issues.
Let’s start by asking why you might want to shrink your log....
2017-05-15
487 reads
I’m a big fan of dynamic SQL. In the past I’ve written a How to, a Best Practices and even...
2017-05-11
644 reads
It’s T-SQL Tuesday again! This month we are being hosted by James Anderson (b/t). Thanks James! He has asked us...
2017-05-09
427 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