2,560
Two Thousand Five Hundred Sixty. Seems like such a random and unassuming number, however, I can say this was the...
2012-10-23
1,478 reads
Two Thousand Five Hundred Sixty. Seems like such a random and unassuming number, however, I can say this was the...
2012-10-23
1,478 reads
When I was considering submitting some sessions to SQL Saturday 149 in Minnesota I thought I would have a difficult...
2012-09-22
816 reads
In my article published yesterday on using Powershell for SQL Durations (Working with SQL Agent Durations), I proposed using a...
2012-08-24
1,636 reads
That is what I wanted to name the new training series that we developed at my employer, Perpetual Technologies (PTI.net)....
2012-08-09
1,027 reads
This last weekend, I had the pleasure of being invited down to Louisville, KY to speak at SQL Saturday #122....
2012-07-24
1,015 reads
It has been a great couple of months for both me and for Perpetual Technologies (my employer). PTI has been...
2012-07-09
885 reads
In my previous post, I shared some of the issues I had when attempting to get Add-Member to work with...
2012-07-05
1,512 reads
Over the past few weeks, I’ve been working with SMO to implement some maintenance routines across my clients. Because of...
2012-07-04 (first published: 2012-06-28)
3,981 reads
I wish I could say that this was a simple task, but as I dove into SMO and some of...
2012-06-19
2,759 reads
I’ve been working a lot lately with SMO and the differences between the various versions between SQL 2005, 2008, and...
2012-06-06
17,472 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