Database Superhero Adventures, January 2018 Edition
Just in case you missed it I wrote a blog post for Idera on creating PowerShell module using Plaster you...
2018-01-01
134 reads
Just in case you missed it I wrote a blog post for Idera on creating PowerShell module using Plaster you...
2018-01-01
134 reads
In the world of profiler and SQL Trace, these actions were an actual part of the payload for the Trace event. In XE, these actions are more like add-ons....
2018-01-01
15 reads
I have recently written about the pains of correlating SQL Trace events to Extended Events (XE) events. That article can...
2018-01-01
325 reads
I have recently written about the pains of correlating SQL Trace events to Extended Events (XE) events. That article can...
2018-01-01
303 reads
I have recently written about the pains of correlating SQL Trace events to Extended Events (XE) events. That article can...
2018-01-01
299 reads
I have recently written about the pains of correlating SQL Trace events to Extended Events (XE) events. That article can...
2018-01-01
501 reads
Wayne’s Tips and Tricks for SSMS
SQL Server Management Studio (SSMS ) is a program that many just launch daily (or only...
2018-01-01
388 reads
Since SSMS is built upon Visual Studio, many of the features available to Visual Studio are also available to SSMS....
2018-01-08 (first published: 2018-01-01)
3,249 reads
Hello Friends, Wish you all a very Happy New Year 2018. Please find the link of my first article of...
2018-01-01
495 reads
Most of you must be knowing that backup in Azure SQL Database fully automatic. After the database is created and the database is automatically backed up by Azure. One...
2017-12-31
15 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