Shredding XML in XEvents
One of the biggest pains with Extended Events is the thing we love to hate – XML. XML is so foreign...
2015-08-26
949 reads
One of the biggest pains with Extended Events is the thing we love to hate – XML. XML is so foreign...
2015-08-26
949 reads
One of the biggest pains with Extended Events is the thing we love to hate - XML. XML is so foreign to many DBAs. It's not relational and often...
2015-08-26
18 reads
2015-08-26
1,382 reads
You find yourself cruising along, just doing your thing as a database administrator. Then the CIO plops down into a...
2015-08-24
720 reads
Find yourself struggling to determine the outcome of attempted compression settings in your database? This should help!
Related Posts:
Failed to Create the Audit File December 31, 2017
Disk Space and...
2015-08-24
11 reads
The joys of inheriting a new database and being thrown into the fire to quickly assimilate as much information about the database as possible can be troublesome. This script...
2015-08-19
7 reads
How well do you know the health of your SQL Servers and databases? Ever wonder about the current health or...
2015-08-14 (first published: 2015-08-07)
2,243 reads
A common requirement, whether it be based out of pure want or truly out of necessity, is to make a...
2015-08-11
3,348 reads
A common requirement, whether it be based out of pure want or truly out of necessity, is to make a large database backup file, that is encrypted, be much...
2015-08-11
13 reads
If I ask you what is DBCC, what would your answer be?
I want you to think about that one for...
2015-08-11
10,870 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