THE IIF statement – SQL has it at last.
TweetG’day All,
While I was writing my last blog post about the new SQL SERVER 2012 CHOOSE statement, it also came...
2014-02-20 (first published: 2014-02-18)
13,694 reads
TweetG’day All,
While I was writing my last blog post about the new SQL SERVER 2012 CHOOSE statement, it also came...
2014-02-20 (first published: 2014-02-18)
13,694 reads
Apache Hive is the de facto standard for SQL-in-Hadoop with more enterprises relying on this open source project than any...
2014-02-17
587 reads
A throwout bearing is a part of an automotive clutch system that temporarily disengages the engine from the manual transmission while shifting....
2014-02-17
448 reads
Toyota Hilux Claims Second Pole Position in Antarctic Race. Have you Hiilux’d?
via Toyota Hilux Claims Second Pole Position (2009).
2014-02-17
512 reads
Monochromatic photos are eye-catching and can bring out details we might miss in regular shots. You can share a single...
2014-02-17
477 reads
If you don’t have kids you might not get the title of the post, it’s part of the theme song...
2014-02-17
635 reads
It’s Monday time for this week’s weekly link round-up. If you want to catch these links “live” (so exciting), follow...
2014-02-20 (first published: 2014-02-17)
1,820 reads
Ever since I worked in an office with adjustable standing desks, I’ve been thinking about getting a standing desk for...
2014-02-17
491 reads
There’s a new SQL Server user group starting up over in Lynchburg, VA. It’s first meeting is February 27, 2014...
2014-02-17
731 reads
I hope you were able to attend my free webinar on Choosing the Right Analysis Services: MOLAP vs. Tabular on...
2014-02-17
1,750 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