TSQL Tuesday #60: Something New Learned – What permissions does have?
What have I learned recently? Well as it happens I learned something rather interesting recently and was actually trying to...
2014-11-11
1,670 reads
What have I learned recently? Well as it happens I learned something rather interesting recently and was actually trying to...
2014-11-11
1,670 reads
Using multiple data files is a common best practice for a number of reasons, but multiple log files? Typically a...
2014-11-05
1,333 reads
You are trying to open a DTS package (yes some people still use DTS packages) and receive the following error:
Error...
2014-11-03
792 reads
The log file tends to fascinate me. In fact one of my favorite posts is where I looked into the...
2014-10-29
1,823 reads
For those of you who have moved completely to SQL 2012 & 2014, Lucky you and don’t judge! For the rest...
2014-10-27
674 reads
I thought of something rather interesting the other day while answering a question asking for help with some table structures....
2014-11-03 (first published: 2014-10-22)
6,581 reads
I certainly hadn’t planned on creating a part two of my post on clustered index columns but in the comments...
2014-10-29 (first published: 2014-10-20)
6,082 reads
You might be wondering why I’m going into such a simple subject. Well the way I see it there are...
2014-10-16
2,761 reads
TSQL Tuesday is a blog party started by Adam Machanic (b/t) almost 5 years ago. This month Tracey McKibben (b/t)...
2014-10-14
1,167 reads
I was watching a great presentation by Brent Ozar(b/t) on why to move to SQL 2014 and in the Q...
2014-10-08
1,301 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