#PowershellBasics: Get input using Read-Host
Conditions are the life blood of programming. This condition is met so now I need to do this task. That ... Continue reading
2020-02-11 (first published: 2020-02-05)
558 reads
Conditions are the life blood of programming. This condition is met so now I need to do this task. That ... Continue reading
2020-02-11 (first published: 2020-02-05)
558 reads
Following along with last month’s documentation homework this month I want you to write a blog post. But Ken, what ... Continue reading
2020-02-07 (first published: 2020-02-03)
311 reads
Inspiration: The process of being mentally stimulated to do or feel something, especially to do something creative. a person or ... Continue reading
2020-01-29
22 reads
If you read the title to this post and your first thought was That’s not SQL is it? then you ... Continue reading
2020-02-05 (first published: 2020-01-27)
875 reads
This is one of those things that probably doesn’t happen all that often, but bit me in the … elbow ... Continue reading
2020-01-31 (first published: 2020-01-22)
410 reads
I don’t know how many of you are working with Windows Core these days but personally I think it’s a ... Continue reading
2020-01-29 (first published: 2020-01-20)
443 reads
I ran into a rather obscure permissions problem the other day. Since I wasn’t able to figure it out on ... Continue reading
2020-01-23 (first published: 2020-01-16)
400 reads
Jon Shaulis (blog|twitter) is hosting T-SQL Tuesday this month. Thanks Jon! And the subject is obvious if you read the ... Continue reading
2020-01-21 (first published: 2020-01-14)
568 reads
I’ve been thinking about writing this for a bit and then a co-worker actually had this problem recently, so, well, ... Continue reading
2020-01-17 (first published: 2020-01-08)
704 reads
If you’ve ever looked at the output for sys.dm_exec_sessions you may have noticed the column program_name. Frequently you’ll see entries ... Continue reading
2020-01-13 (first published: 2020-01-06)
646 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