In 2012, It’s Me and Vanilla Ice
Like many others, I’m planning a few changes for my life for next year. I’m a believer in finding one’s...
2011-12-27
1,208 reads
Like many others, I’m planning a few changes for my life for next year. I’m a believer in finding one’s...
2011-12-27
1,208 reads
Dear Friends, we had a user group meeting last week – I and Vinay Pugalia was here. We have discussed many...
2011-12-26
599 reads
Over the last few days, you may have noticed that there’s been a bit of talk about a SQL Server...
2011-12-26
937 reads
Making a backup of your Service Master Key (SMK) should be one of the first things that you do if...
2011-12-26
5,165 reads
On December 19, 2011, Microsoft released SQL Server 2008 R2 RTM Cumulative Update 11 (CU11), which is Build 10.50.1807.0. I...
2011-12-26
1,476 reads
Webcast: Putting a Better SQL Server in Production
Production Line
Webcast:Putting a Better SQL Server in Production
Date: Wednesday, January 18, 2012 3:00...
2011-12-26
1,247 reads
On December 19, 2011, Microsoft released SQL Server 2008 R2 SP1 Cumulative Update 4 (CU4), which is Build 10.50.2796. I...
2011-12-26
3,063 reads
Introduction
Many times while developing any report we come across a situation where we need to SORT the TABLE columns or...
2011-12-30 (first published: 2011-12-26)
21,201 reads
SELECT 'Happy '+ DATENAME(dw, GETDATE())Welcome to the penultimate installment of SQL Server A to Z (it’s not often I get to...
2012-01-02 (first published: 2011-12-26)
2,307 reads
Holiday Greetings to all you DBA's and SQL Server professionals! This blog goes out to all of you who are on-call...
2011-12-26
2,281 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