Join me for Masking, Privacy, Protection, and Clones at SQL in the City Feb 28
Registration is open for SQL in the City 2018. Our first event is Feb 28 and I’ll be heading back...
2018-02-14
365 reads
Registration is open for SQL in the City 2018. Our first event is Feb 28 and I’ll be heading back...
2018-02-14
365 reads
Nested views are bad. Let’s get that out of the way. What is a nested view anyway? Imagine that you...
2018-02-14
2,388 reads
One of the most basic things to improve performance in our queries is using indexes, but this doesn't mean that...
2018-02-14
569 reads
One of my goals for 2018 is to expand the reach of my blog.
As a blogger starting out I had...
2018-02-14
327 reads
For TSQL Tuesday #99, @AaronBertrand gave us an invitation to write about something we’re passionate about outside of SQL Server. As a community we spend a lot of time digging into nerdy...
2018-02-13
30 reads
This month Aaron Bertrand (b | t) has given us a Dealer’s Choice on the T-SQL Tuesday topic. I’m of course going...
2018-02-13
147 reads
It’s hard to believe that we have reached T-SQL Tuesday #99 already. This month’s host is Aaron Bertrand (blog|@AaronBertrand), and...
2018-02-13
766 reads
In this module you will learn how to use the Brick Chart by MAQ Software. The Brick Chart provides a...
2018-02-27 (first published: 2018-02-13)
2,527 reads
Database maintenance does not have to be expensive. There are free tools out there that will make your life easier. Of...
2018-02-22 (first published: 2018-02-13)
3,188 reads
A common problem when looking at execution plans is attributing too much meaning and value of the costs of operators. The percentages shown for operators in query plans are...
2018-02-13
24 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