Sharepoint Diagnostics and XE
One of the all-time greatest and most beloved applications among DBAs happens to be Sharepoint. Most of us would be...
2018-01-04
1,662 reads
One of the all-time greatest and most beloved applications among DBAs happens to be Sharepoint. Most of us would be...
2018-01-04
1,662 reads
In this article I have introduced you to a quick session setup that comes from using the SPDiag tool that could plausibly be useful in the troubleshooting of various...
2018-01-04
65 reads
There are many many uses for Extended Events. In this article I show a quick session setup that can be useful in the troubleshooting of various different problems (most...
2018-01-03
17 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
501 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
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
325 reads
One day while checking things for clients, I happened across a fun little error message – “SQL Server Audit failed to...
2017-12-31
1,259 reads
One day while checking things for clients, I happened across a fun little error message – “SQL Server Audit failed to...
2017-12-31
2,064 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