What are trace flags?
Trace flags are one of those things that I’ve heard about more and more over the last five or six...
2014-09-18 (first published: 2014-09-11)
7,966 reads
Trace flags are one of those things that I’ve heard about more and more over the last five or six...
2014-09-18 (first published: 2014-09-11)
7,966 reads
Who are your worst offenders? By offenders I mean, queries that are consuming the most resources on your server(s).
I know...
2014-09-17 (first published: 2014-09-11)
7,873 reads
The following query lists all the Primary keys of all the table.
OP has requested to list all PK and composite...
2014-09-16 (first published: 2014-09-10)
7,119 reads
A few weeks ago I was fortunate enough to attend VMware’s VMworld 2014 conference in San Francisco, CA. The show...
2014-09-10
495 reads
Who is up for a little free learning this week? Besides the opulence and feast that was the 24 Hours of PASS (Summit Preview), we have more training in...
2014-09-10
5 reads
Who is up for a little free learning this week? Besides the opulence and feast that was the 24 Hours...
2014-09-10
674 reads
I’ve put together a new Curah! of links to some of the better articles on SQL Server Statistics, specifically those...
2014-09-15 (first published: 2014-09-10)
7,399 reads
Today is once again TSQL Tuesday. This month the event and topic are being hosted by Sebastian Meine (blog | twitter). You can read all about the topic this...
2014-09-09
8 reads
Today is once again TSQL Tuesday. This month the event and topic are being hosted by Sebastian Meine (blog | twitter)....
2014-09-12 (first published: 2014-09-09)
6,523 reads
The 2014 Apple keynote was today, with the announcement of the iPhone 6 and iWatch taking center stage. I was...
2014-09-09
783 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