Creating a SQL Server Test Lab On Your Workstation – Part One, Installing The Domain Controller
One of the most useful tools to the DBA when we need to test new features, recreate a fault that...
2017-12-18
646 reads
One of the most useful tools to the DBA when we need to test new features, recreate a fault that...
2017-12-18
646 reads
The second best thing to questions that people ask is when I sit down to write a book. It’s so...
2017-12-18
773 reads
Hello Everyone! In this episode of the “Problem, Design, Solution” series we will be talking about the “Folder” option inside...
2017-12-18
622 reads
After years of having to deal with Connect – the feedback platform of Microsoft – it is announced a successor has been...
2017-12-18
1,153 reads
DBCC CHECKDB has the ability to perform parallel checking of objects. However, it absolutely depends on the edition of SQL...
2017-12-18
323 reads
tl;dr: When using a windows or active directory authenticated id you do not put the username or password into your...
2017-12-18
716 reads
We’re all creatures of habit, and work more efficiently when we know exactly where to find the tools we need....
2017-12-18
343 reads
I remember being thoroughly baffled in grade school by word problems. How in the world was I supposed to translate...
2017-12-18
369 reads
T-SQL Tuesday is a monthly blog party started by respected SQL Guru Adam Machanic. I was honored with hosting this...
2017-12-18
828 reads
Dynamic Data Masking (DDM) is new feature of SQL Server 2016. DDM helps in preventing unauthorized access to sensitive data....
2017-12-18
1,022 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 Risk Vs Reward, The never...
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...
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