Powershell is Really Easy… If you know what you’re doing
Sigh… I just spent almost a full work day trying to come up with, what turned out to be a...
2010-10-18
3,170 reads
Sigh… I just spent almost a full work day trying to come up with, what turned out to be a...
2010-10-18
3,170 reads
Or, at least gets translated into Russian.
I realize I’m effectively a 10 year old, but, come on, HOW COOL IS...
2010-10-15
608 reads
You know those guys that work the door at clubs, seperating the wheat from the chaff, culling the herd, Choosing the Slain, sifting...
2010-10-14
714 reads
The absolute biggest part of the PASS Summit is the one thing that most people don’t take advantage of, networking....
2010-10-13
606 reads
I’ll be presenting tonight at the Southern New England SQL Server Users Group (SNESSUG). The topic is “Using DMVs as...
2010-10-13
692 reads
The real world can get in the way of important things like SQL Saturday. In the case of SQL Saturday...
2010-10-12
571 reads
Mark your calendars. Make your travel arrangements. Plan on being in the Boston area on April 16th, 2011. Three of...
2010-10-05
547 reads
I try to watch the search phrases that point people to the blog because sometimes, you get a sense of...
2010-10-04
449 reads
Adam Machanic (blog|twitter) has put on a SQL Saturday/Data camp event in New England for the last two years. I’ve...
2010-10-04
400 reads
I saw an odd statement the other day, “The size of the name of the parameter does not affect performance.”...
2010-09-27
1,039 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