Bring Offline File Online — Modify SQL Server Metadata
In my last post, I demonstrated how to mount a database with missing NDF files. In the end, we still...
2013-05-09
1,561 reads
In my last post, I demonstrated how to mount a database with missing NDF files. In the end, we still...
2013-05-09
1,561 reads
For those of you that don’t know DTA stands for Database Engine Tuning Adviser and is available from the Tools...
2013-05-15 (first published: 2013-05-09)
11,493 reads
One of the tools that Red Gate Software makes is SQL Source Control. It’s a plug in to SSMS that...
2013-05-08
8,481 reads
2013-05-08
1,367 reads
Welcome to the Roc!
Just a quick note that I’ll be presenting this weekend, Saturday May 11th, at SQLSaturday in Rochester,...
2013-05-08
797 reads
If you read my post from yesterday you will know I will be spending some time on the US east...
2013-05-08
783 reads
I’m currently setting up a demo environment using SQL Server 2012 and SharePoint 2013 (more on that in later blog...
2013-05-14 (first published: 2013-05-08)
4,430 reads
The following table lists all builds of SQL Server 2012 known hotfixes, service packs and KB articles that have been...
2013-05-08
1,684 reads
The following table lists all builds of SQL Server 2008 R2 known hotfixes, service packs and KB articles that have...
2013-05-08
21,347 reads
The following table lists all builds of SQL Server 2008 known hotfixes, service packs and KB articles that have been...
2013-05-08
1,341 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