How Many Objects Can Own Pages in a Mixed Extent
I saw an exchange on Twitter this past weekend on the #sqlhelp hash tag about how pages are allocated for...
2015-09-14
666 reads
I saw an exchange on Twitter this past weekend on the #sqlhelp hash tag about how pages are allocated for...
2015-09-14
666 reads
Earlier this week, I got the opportunity to present online for the Oklahoma City SQL Server User Group on SQL...
2015-07-15
726 reads
Recently, I was working on a Peer-to-peer replication automation project. When I switched from my local test servers to some...
2015-04-16
759 reads
It’s time again for that T-SQL blog party T-SQL Tuesday, and this month’s host is Mike Donnelly (blog|@SQLMD). If you...
2015-04-14
703 reads
I recently installed my first deployment of Master Data Services (MDS). I installed the SQL Server 2014 (Enterprise Edition) MDS...
2015-04-13
848 reads
When you’re working through some vague performance issues (e.g., “SQL Server seems slow today”), one of the common things to...
2014-08-18
1,260 reads
I am honored to be selected to deliver 2 sessions at the SQL PASS Summit 2014. I will be delivering...
2014-06-29
1,327 reads
I talked previously about network pipelines and how to get the most out of a fat network in the post...
2014-05-07
1,191 reads
I have one more thing I want to talk about regarding the conversation I had recently with my friends and...
2014-02-14
1,120 reads
I was talking recently with my friends and former colleagues at Idera about the things that slow down SQL Server....
2014-02-11
1,091 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