SQL Server Log Backups
While presenting a session on Common Backup Problems both at SQL Saturday in Orange County and at SQL Connections in...
2012-04-02
1,064 reads
While presenting a session on Common Backup Problems both at SQL Saturday in Orange County and at SQL Connections in...
2012-04-02
1,064 reads
When you execute a multi-statement user-defined function you may see an execution plan that looks something like this:
It appears as...
2012-03-30 (first published: 2012-03-26)
8,343 reads
I knew that enabling TDE would cause the information stored within to, effectively, be randomized, which means it would seriously...
2012-03-19
2,810 reads
It’s surprisingly easy to set up the new AlwaysOn features. I’ve done it on VMs running on my laptop, from...
2012-03-14 (first published: 2012-03-12)
3,165 reads
I’m travelling to several upcoming events and I’d love to sit down and talk with you. Yes, I get it,...
2012-03-08
880 reads
There’s a very old saying, “When you find yourself in a hole, stop digging.”
And my evidence today is:
That’s certainly not...
2012-02-07
1,215 reads
Tom LaRock (blog|twitter) has assigned an interesting topic for Meme Monday this month, working with deadlines.
Some people hate deadlines. Some...
2012-02-06
1,220 reads
Let’s say, you want to spend a couple of days learning about SQL Server. You also want to spend some...
2012-02-01
1,186 reads
The first ever Tech on Tap event was held on Saturday, January 27th, 2012 at the Stone Cellar Brewpub in...
2012-01-31
2,081 reads
The question came up, what are the top 3-5 things that you look at in a query. I realized then...
2012-01-30
1,838 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