Security Questions: Grant Permissions to All Stored Procedures
As I mentioned in the introductory post, in the Introduction to SQL Server Security session for Pragmatic Work’sTraining on the T’s, I...
2013-05-22
721 reads
As I mentioned in the introductory post, in the Introduction to SQL Server Security session for Pragmatic Work’sTraining on the T’s, I...
2013-05-22
721 reads
I am honored to say that have been selected to present this year. I'll be giving a talk on my...
2013-05-22
385 reads
I’m happy to officially announce that I’ll be presenting at this year’s PASS Summit in Charlotte, NC! I’ll be presenting...
2013-05-22
563 reads
For sake of future generations, let’s begin to reduce typing and reuse code we’ve built. I think we can all...
2013-05-22
1,312 reads
Last week I got the news that none of the four sessions I submitted for this year were accepted. Disappointing...
2013-05-22
684 reads
With the PASS Summit sessions announced, I took a quick look to see how many were what I'd consider security-centric....
2013-05-22
2,844 reads
Earlier this week I posted The many uses of CROSS APPLY and I’m quite glad I did. I’ve been working...
2013-05-22
878 reads
I’m happy to announce that I have been selected to present
at the SQL PASS Summit in Charlotte, North Carolina this...
2013-05-22
683 reads
The 11th cumulative update release for SQL Server 2008 Service Pack 3 is now available. Cumulative Update 11 contains all...
2013-05-22
649 reads
I was asked a good question the other day, one that I wasn’t sure of the answer. The question was...
2013-05-22
1,738 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