Red Gate Dependency Tracker - Making Databases Into Moving Art
data structures are art
If anyone thinks that working with complex data structures is boring... I don't know what world they...
2016-04-27
1,062 reads
data structures are art
If anyone thinks that working with complex data structures is boring... I don't know what world they...
2016-04-27
1,062 reads
Figured I'd share a way to automate the SSMS 2016 updates until it gets it's own fancy self updater. I...
2016-04-26 (first published: 2016-04-19)
2,707 reads
Disclaimer: I have been provided with a free license because I am reviewing. This doesn't impact my assessment of the...
2016-04-14
1,259 reads
Moving system databases in SQL Server takes a bit of practice. I got that again, along with a dose of...
2016-04-01
8,293 reads
This turned out to be quite a challenge. I couldn’t find anything that made this very clean and straight forward...
2016-03-18
419 reads
Quick snippet I threw together to help with failing over synchronized databases to the other server in bulk. No way...
2016-03-18
846 reads
Ran into an issue with the “Preview New Reporting Portal” link on a fresh install of 2016 giving me a...
2016-03-18
447 reads
the problem
An issue with SQL Server 2012 SP3 was identified that impacted EF4/5 due to additional datatypes in the dll....
2016-03-18
7,501 reads
If you want to create a TFS query that would identify work items that have changed, but were not changed...
2016-03-18
425 reads
Should I use option(recompile)?
This will probably be a multiple stage discussion. The notes I’m providing today were sparked off of...
2016-02-02
6,974 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