Make BOL your friend
One of the most powerful tools we have as users of SQL Server is Books Online (BOL). Whether you work...
2014-06-30
4,076 reads
One of the most powerful tools we have as users of SQL Server is Books Online (BOL). Whether you work...
2014-06-30
4,076 reads
(Be sure to checkout the FREE SQLpassion Performance Tuning Training Plan – you get a weekly email packed with all the...
2014-06-30
4,095 reads
Imagine that you have a huge collection of Hello Kitty images (I do).
One day you make a decision to organize...
2014-06-30
1,963 reads
Today, We will go through with the steps of renaming or changing SQL Server Standalone Instance.
Step 1 : Check Current Instance...
2014-06-30
22,880 reads
I am honored to be selected to deliver 2 sessions at the SQL PASS Summit 2014. I will be delivering...
2014-06-29
1,327 reads
Been busy the past week, not as much time on this as I’d have liked:
Received the “retro” flyer with the...
2014-06-27
1,140 reads
I am excited and humbled to be speaking at the PASS Summit for my second year in a row! There...
2014-06-27
1,165 reads
Photo credit – Travis
Ever go digging through your backyard for dinosaur bones? Maybe not, but it’s worthwhile from time to time...
2014-06-27
1,368 reads
Let’s make it democratic. Let’s ensure we get solid sessions from key people. And let’s save a ton of work...
2014-06-27
1,291 reads
What is 268435456? is the Friday question of the day. It’s a trivia question, but maybe an interesting one for...
2014-06-27
1,326 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