#PowershellBasics: Get-Help -Online
One of the other things I learned from the Powershell class I’m taking this week is that there is an ... Continue reading
2019-11-01 (first published: 2019-10-21)
476 reads
One of the other things I learned from the Powershell class I’m taking this week is that there is an ... Continue reading
2019-11-01 (first published: 2019-10-21)
476 reads
As you know from the last few posts, I’m in a class on Powershell. One of the first things we ... Continue reading
2019-10-23 (first published: 2019-10-16)
429 reads
I don’t know about you, but I like having the tools that I’m likely to use on my taskbar. That ... Continue reading
2019-10-14
99 reads
I’m taking a Powershell class this week and I have to say the teacher is one of the best I’ve ... Continue reading
2019-10-10
370 reads
It’s that time again! Alex Yates (b/t) has asked us to discuss a time in tech when we’ve changed our ... Continue reading
2019-10-11 (first published: 2019-10-08)
463 reads
Every database person I’ve ever met writes at least some code at some point in their career. That code might ... Continue reading
2019-10-14 (first published: 2019-10-02)
552 reads
2019-09-30
39 reads
I had a discussion a while back, I think it was with Grant Fritchey (b/t) but I just can’t remember. ... Continue reading
2019-09-25
30 reads
tl;dr; Add PRINT and/or SELECT statements. Comment/uncomment out pieces of code to isolate problems. Change INSERT/UPDATE/DELETE statements to SELECTs. Disclaimer: ... Continue reading
2019-10-07 (first published: 2019-09-23)
847 reads
When studying Azure one of the things you’ll be asked to learn is the Powershell commands that can control, well, ... Continue reading
2019-09-18
83 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