A Job Done Quietly and Well
My current client has a five story building, two break rooms and two sets of bathroom per floor, with I’m...
2012-09-17
632 reads
My current client has a five story building, two break rooms and two sets of bathroom per floor, with I’m...
2012-09-17
632 reads
Most managers and employers distinguish between attending a conference and training. We (the royal SQL community we) offer quite a...
2012-09-14
1,124 reads
Order status on the web site still shows an estimated ship date of the 4th (of September) for my X1...
2012-09-14
817 reads
Since earlier this year I’ve been thinking to replace my aging but still useful laptop, mostly to get something lighter,...
2012-09-13 (first published: 2012-09-08)
1,883 reads
Sharing some stuff I’ve read recently that I found interesting – and that you may find interesting!
Help More, Judge Less. I’ll...
2012-09-12
667 reads
Last year I wrote about stuff I carry in my laptop bag. Nothing original, definitely a tendency to carry things...
2012-09-12
1,226 reads
Recently I needed to help a colleague with a small inventory true up task. We needed to know items that...
2012-09-10
807 reads
A recent article in the PASS Connector called out some interesting stats about SQLSaturday for 2011 and 2012. I’m including...
2012-09-09
704 reads
Back to the list, what should go in this minimalist creation? Here’s what I have so far:
laptop (yes)
charger (yes – buy...
2012-08-31
1,525 reads
I read a lot, one the most recent books is The 4 Disciplines of Execution which is, of course, about...
2012-08-31
1,550 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