Implementing Smart Differential Backups Using Ola Hallengren’s Backup Scripts in SQL Server 2017
This is part 2 of 2 on taking smart backups. I wrote a previous blog on how to use configuration...
2018-01-23
149 reads
This is part 2 of 2 on taking smart backups. I wrote a previous blog on how to use configuration...
2018-01-23
149 reads
Before you run a PowerShell command that makes a change to something you should check that it is going to...
2018-01-23
1,041 reads
Last week we looked at how easy it is to import GeoJSON data into SQL Server’s geography datatype.
Sometimes your source...
2018-01-23
450 reads
Last week we looked at how easy it is to import GeoJSON data into SQL Server's geography datatype.
Sometimes your source data won't be perfectly formatted for SQL Server's spatial...
2018-01-23
19 reads
Introducing: The SQLUndercover Inspector! Finally we have a V1 almost ready to hit our GitHub but what exactly is it?
Just another...
2018-01-22
495 reads
The other day I ran into an odd problem trying to answer the following question on DBA.StackExchange:
How to filter out...
2018-02-01 (first published: 2018-01-22)
1,751 reads
SSMS supports Outlining, the ability to selective hide blocks of code. This can be very useful, especially when working with...
2018-01-22
144 reads
SSMS supports Outlining, the ability to selective hide blocks of code. This can be very useful, especially when working with...
2018-01-22
366 reads
Times are changing, 10 years ago I would never have thought that self-tuning databases would be available as a packaged...
2018-01-31 (first published: 2018-01-22)
2,421 reads
Deleting data from a table using T-SQL works quite a lot like the UPDATE statement.
How it Works
In the same way...
2018-01-31 (first published: 2018-01-22)
2,258 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