The 2012 Powershell Scripting Game(shows) in review
Over the past few weeks, those around me know that I’ve been talking a lot about Powershell, how much it...
2012-05-01
1,205 reads
Over the past few weeks, those around me know that I’ve been talking a lot about Powershell, how much it...
2012-05-01
1,205 reads
In a recent Scripting Games event, I had to format some byte values into their most appropriate size according to...
2012-04-19
4,022 reads
I’ve been thoroughly enjoying my experience this year with the Scripting Games. This is the first year I've competed and...
2012-04-16 (first published: 2012-04-12)
6,771 reads
A while back, my young son thought it would be fun to use a CD as a virtual surfboard on...
2012-04-10
1,583 reads
A task that I have had to do several times over the years is determine if an IP Address string...
2012-04-03
4,191 reads
While preparing a demo for a presentation, I generated a 18456 error in the SQL instance by selecting a non-existent...
2012-03-29
1,180 reads
One of the challenges I’ve had over the years is figuring out a way to add the SQL Service accounts...
2012-03-27
10,538 reads
Over the next few weeks, I plan to share some of the discoveries I've had when working with Windows 2008R2...
2012-03-19
2,489 reads
This is the first time I've participated in T-SQL Tuesday - I hope to do so more often...
I can recall several...
2012-03-13
1,029 reads
My post this weekend about slaying beasts with magical .dll incantations was my way of relieving some stress after having...
2012-02-07
2,397 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