Fixing system database corruption with setup.exe
Corruption of the system databases is a serious matter. Setup.exe is a brute force method of replacing them.
2018-04-17
1,001 reads
Corruption of the system databases is a serious matter. Setup.exe is a brute force method of replacing them.
2018-04-17
1,001 reads
Using SELECT to store values into variables is an important technique, but you need to know some of the gotchas as well.
2018-04-02
6,102 reads
2016-11-17
3,138 reads
Data types are an important part of how tables and variables work. Did you know that constants have databases too?
2016-10-03
1,693 reads
The DAC is an important tool and several things can go wrong when trying to connect to it.
2014-07-31
3,337 reads
One of the common problems is dealing with apostrophes in T-SQL. This article examines the challenges of single quotation marks and ends with a short quiz.
2014-07-11 (first published: 2013-01-03)
37,174 reads
2014-07-01
8,560 reads
Learn how an outer join works and how you can use it in your applications to find the results you need when matching data isn't in all your tables.
2014-01-17 (first published: 2012-09-10)
23,332 reads
2012-02-22
7,638 reads
What on earth does “Login failed for user ‘(null)’, Reason: Not associated with a trusted SQL Server conn” mean?
2011-12-09
40,112 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