MAXDOP and Cost Threshold for Parallelism – an example for a parallel query
The most popular post on this blog ranked by hits is one about the CXACKET wait stat. There are no...
2012-06-18
2,415 reads
The most popular post on this blog ranked by hits is one about the CXACKET wait stat. There are no...
2012-06-18
2,415 reads
Tuesday’s (June 19th, 2012) PASS Data Architecture Virtual Chapter has Neil talks about database design that uses Constraints for Integrity...
2012-06-14
704 reads
I have 2 upcoming speaker opportunities in June and am very excited about presenting this material.
June 9th is in...
2012-05-26
764 reads
Baton Rouge’s annual tech event for the IT community is coming up August 4th on the beautiful campus of LSU....
2012-05-17
669 reads
Thursday’s (May 17th, 2012) PASS Data Architecture Virtual Chapter has Mike demonstrating some cool Table Partitioning scripts which I was...
2012-05-14
559 reads
I enjoyed a long weekend in Houston starting with Kalen Delaney’s Pre-con on Query Tuning. I have learned over the...
2012-04-27
1,657 reads
Thursday’s (May 17th, 2012) PASS Data Architecture Virtual Chapter has Mike demonstrating some cool Table Partitioning scripts which I was...
2012-04-18
567 reads
Wow, blessed to speaker at another SQL Saturday in Houston #107. The first task of this weekend is Friday. Kalen...
2012-04-09
730 reads
An important operator to understand in execution plans is a scan. A Scan can be good and bad, so understanding...
2012-04-02
4,326 reads
The Merge Join is a Physical Operation when joining 2 sets of data that are in the same order.
There...
2012-03-15
5,909 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