Why I just became a Microsoft Employee
I have been an independent consultant (IC) for quite a while now. In an amazing number of coincidences, or just plain...
2014-02-11
1,511 reads
I have been an independent consultant (IC) for quite a while now. In an amazing number of coincidences, or just plain...
2014-02-11
1,511 reads
Since the initial beta release of Cloudera Impala more than one year ago (October 2012), we’ve been committed to regularly...
2014-02-11
496 reads
It sounded good in principle, especially given the requirements and the limitations:
We needed our various sites to be able to...
2014-02-11
710 reads
There’s a staggering amount of information an NBA coach would have to hold in his head to do his job...
2014-02-13 (first published: 2014-02-11)
1,663 reads
Some time ago I added a script component to a few SSIS packages to compare rows with each other using...
2014-02-11
2,606 reads
Jason Brimhall is hosting the 51st T-SQL Tuesday this month with “Place your bets!.
It’s always a gamble when buying a...
2014-02-14 (first published: 2014-02-11)
1,584 reads
(Be sure to checkout the FREE SQLpassion Performance Tuning Training Plan, where you are getting week by week via email...
2014-02-11
910 reads
Instant File Initialization (IFI) is an interesting topic with regards to how SQL Server works with storage. It is an...
2014-02-11
651 reads
One of the biggest mistakes we can make when troubleshooting is to confuse the necessary responsibility of observing activity that...
2014-02-11
1,512 reads
I’m not much of a
betting man, but if I had to bet that I would participate in this month’s T-SQL
Tuesday...
2014-02-11
2,016 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