What is the CXPACKET Wait Type?
This wait type indicates that parallel plans execute on the server. This wait type doesn’t necessarily means there is a...
2018-03-02
860 reads
This wait type indicates that parallel plans execute on the server. This wait type doesn’t necessarily means there is a...
2018-03-02
860 reads
Several months ago, I was looking at a question posted on ask.sqlservercentral.com. I discovered an answer to a question regarding...
2018-03-02
159 reads
Several months ago, I was looking at a question posted on ask.sqlservercentral.com. I discovered an answer to a question regarding...
2018-03-12 (first published: 2018-03-02)
5,240 reads
Let’s say you have a very large table on a SQL Server 2012 Standard Edition instance. This means: old cardinality...
2018-03-02
412 reads
I’m delighted to announce I’ll be giving a session about data modeling in a self-service BI environment at Techorama 2018...
2018-03-02
341 reads
In a recent post, I talked about SQL Server reads and how the data is stored in pages. One of...
2018-03-02
56 reads
2018-03-02
536 reads
In my previous post on new functions in SQL Server 2017, I discussed about the STRING_AGG function. Here, I am...
2018-03-02
1,388 reads
You might have noticed that I’ve been pretty quiet as of late. We’re working on a super top secret internal...
2018-03-01
767 reads
One of my favorite conferences is held in Myrtle Beach, SC, in June. It’s a security and digital forensics conference which...
2018-03-01
316 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