4 Rules of Right When Running a Query
Last month in January, I participated in the Idera #sqlchat. This is a monthly chat meeting that is organized by...
2018-02-21 (first published: 2018-02-09)
3,125 reads
Last month in January, I participated in the Idera #sqlchat. This is a monthly chat meeting that is organized by...
2018-02-21 (first published: 2018-02-09)
3,125 reads
Here we go for the 10th Interview of Data Channel. In this interview, Dinesh Priyankara, a 12-time MVP from Sri...
2018-02-09
378 reads
A new project underway is Speaking Mentors. I think this is an amazing idea and the response that it’s had...
2018-02-09
410 reads
In two weeks from now, on 23rd of February, I will be speaking at SQLBits 2018! It’s my first time on the largest SQL Server conference in Europe for...
2018-02-09
22 reads
sp_AGReconfigure 1.1 is now available HERE and on GitHub
V1.1 includes a new Parameter and some minor bug fixes:
@Readable
NULL – DEFAULT: ...
2018-02-08
390 reads
In this module you will learn how to use the Filter by List Custom Visual. The Filter by List allows...
2018-02-20 (first published: 2018-02-08)
2,495 reads
For the last 7 years, I have been speaking at the PASS Summit. This event is usually in Seattle, but one year it was in Denver (did not speak...
2018-02-08
11 reads
In the first part of this series, we looked at where to find out more information about GDPR in the...
2018-02-20 (first published: 2018-02-08)
2,086 reads
In the first part of this series, we looked at where to find out more information about GDPR in the UK (hint: The ICO.gov website has everything you need)....
2018-02-08
20 reads
In the first part of this series, we looked at where to find out more information about GDPR in the...
2018-02-08
42 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