I learned about the order of logical operations #SQLNewBlogger
Another post for me that is simple and hopefully serves as an example for people trying to get blogging as...
2018-03-30 (first published: 2018-03-22)
2,654 reads
Another post for me that is simple and hopefully serves as an example for people trying to get blogging as...
2018-03-30 (first published: 2018-03-22)
2,654 reads
Back in September 2017 Microsoft announced a new security feature for Azure SQL Database called the SQL Vulnerability Assessment (VA)....
2018-03-22
1,017 reads
A quick blog post for future reference, because I know I’ll bump into this again someday.
When you’re working with a...
2018-03-29 (first published: 2018-03-22)
1,864 reads
Welcome to WIN at IT contracting: A FREE guide showing YOU How to get the most out of Recruitment Agent...
2018-03-22
369 reads
I’m giving a webinar tomorrow, March 22, 2018, at 3 PM Eastern.
Free Registration Link
Here’s what I’ll be covering:
Are you struggling...
2018-03-21
365 reads
This post continues our look at date and time data types in SQL Server. SQL Server 2008 introduced new data...
2018-03-21
357 reads
There are several different options available for working with tabs and spaces in SSMS. In fact, there are enough that...
2018-03-29 (first published: 2018-03-21)
2,955 reads
Have you ever had an issue where TempDB was filling up on your secondary replicas? Do those secondaries happen to...
2018-03-28 (first published: 2018-03-21)
3,958 reads
This is the second article in the “Backup and Restore (or Recovery) in SQL Server” stairway series (see the full...
2018-03-21
321 reads
You need to move a table from one instance to another with the following requirements:
The instances are on separate domains....
2018-03-21
375 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