Cumulative Update – 1 for SQL Server 2012 Service Pack 2 Is Now Available !
The 1st cumulative update release for SQL Server 2012 Service Pack 2 is now available for download at the Microsoft...
2014-07-27
761 reads
The 1st cumulative update release for SQL Server 2012 Service Pack 2 is now available for download at the Microsoft...
2014-07-27
761 reads
This blog post is a continuation of the initial announcement almost a month ago about the session selection process that...
2014-07-25
214 reads
There are different type of events – good ones, great ones, mediocre ones, bad ones & excellent ones.
There is a technological event...
2014-07-25
212 reads
Yesterday I presented about Change Data Capture for the Pragmatic Works Free Training on the T’s. I covered the basics...
2014-07-25
1,474 reads
I will be giving a presentation on ETL (Extract, Transform, Load) security at two user groups in the coming weeks.
Securing...
2014-07-25
882 reads
Photo credit – Husso
I’ve always been a fan of the feeling when I find an old blog post that’s got just...
2014-07-25
816 reads
One of the many things we’re discussing going into the 2014 PASS election is what the planned two official campaign...
2014-07-25
668 reads
It’s Friday, time to look back at the most popular RealSQLGuy posts of the week. Because it’s Friday and you’re...
2014-07-25
372 reads
Just a very quick post to say thank you to all the organisers, speakers, helpers, sponsors, venue staff, caterers, party...
2014-07-25
139 reads
Just a very quick post to say thank you to all the organisers, speakers, helpers, sponsors, venue staff, caterers, party...
2014-07-25
637 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