Simple Parameterization and Data Types
Simple paramaterization occurs when the optimizer determines that a query would benefit from a reusable plan, so it takes the...
2015-04-02 (first published: 2015-03-24)
6,982 reads
Simple paramaterization occurs when the optimizer determines that a query would benefit from a reusable plan, so it takes the...
2015-04-02 (first published: 2015-03-24)
6,982 reads
Hello all,
It’s been a while since my last update. Sorry. I’ve just been traveling and presenting and working on books...
2015-03-31
1,107 reads
Last year I purchased a Lenovo W530. Nightmares then ensued. Nice laptop if you just want to use it as...
2015-03-25
620 reads
The question came up at SQL Rally, “Can you use Extended Events to monitor for query timeouts?”
My immediate response was...
2015-03-20 (first published: 2015-03-12)
7,648 reads
The PASS SQL Saturday events are meant to be a place to grow the pool of speakers, provide a mechanism...
2015-03-16
850 reads
2015-03-16
191 reads
It’s not a question of scheduling. I just haven’t been to lots of community events in the last several months...
2015-03-13
586 reads
I get around quite a bit.
Next week I’ll be visiting three cities in Germany talking to user groups in Frankfurt,...
2015-03-09
665 reads
Check out this DevOps Reactions animated GIF and caption.
It’s funny on multiple levels, but it also makes me both mad...
2015-03-06 (first published: 2015-02-24)
6,821 reads
Sjor Takes (b|t) has just barely started blogging, but he’s got a great post about a discussion he had with...
2015-03-02
803 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