Book Review: Moneyball
With the movie coming out I realized somehow I’d missed reading Moneyball by Michael Lewis. It’s the story of how...
2011-11-09
696 reads
With the movie coming out I realized somehow I’d missed reading Moneyball by Michael Lewis. It’s the story of how...
2011-11-09
696 reads
Happy, Wednesday folks! We're 3-days away from SQLInspiration, and that is the event we've been reading about for some months...
2011-11-09
1,305 reads
T-SQL Tuesday #024 – Using SYSTEMRESTRICTSCHEMA Function in MDX to Query DMVs
This blog entry is participating in T-SQL Tuesday #024, hosted...
2011-11-08
1,798 reads
SQL Saturday 99 on Friday is upon us. I look forward to seeing you at the event. For details check...
2011-11-08
409 reads
I had my telephone interview for the PASS Board of Directors this afternoon and I'm cautiously optimistic that I did...
2011-11-08
637 reads
Functions are very handy. They can also prove to be the cause of poor performance (such as was the case with that string splitter). When used appropriately, you can...
2011-11-08
10 reads
I find myself just now sitting down to write this as the deadline for TSQL Tuesday 24 fast approaches. Fortunately...
2011-11-08
667 reads
If this article is true, and I suspect it is for some software engineers, why aren’t more people learning programming?
I...
2011-11-08
1,066 reads
The Long Road
I am going to post this as a series covering, in detail, everything humanly possible about the logistics...
2011-11-08
1,290 reads
Right I've been itching to post another Blog and actually contribute something this time. This isn't something I've learned but something I've taught many...
2011-11-08
807 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