Some simple examples of querying xml with sql
XML is a beast if you've never tackled it. Here are some simple examples of what I discovered as I...
2015-06-30 (first published: 2015-06-24)
2,918 reads
XML is a beast if you've never tackled it. Here are some simple examples of what I discovered as I...
2015-06-30 (first published: 2015-06-24)
2,918 reads
XML is a beast if you’ve never tackled it. Here are some simple examples of what I discovered as I...
2015-06-24
298 reads
Found a couple good walkthroughs on enabling instant file initialization. However, I'm becoming more familar with the nuances of various...
2015-06-01
803 reads
Found a couple good walkthroughs on enabling instant file initialization. However, I’m becoming more familar with the nuances of various...
2015-05-22
652 reads
Couldn’t find documentation showing that upgrade from SQL 2014 evaluation version was possible to developer edition. I just successfully converted...
2015-05-04
566 reads
Couldn't find documentation showing that upgrade from SQL 2014 evaluation version was possible to developer edition. I just successfully converted...
2015-05-04
2,622 reads
I was dealing with a challenging dynamic sql procedure that allowed a .NET app to pass in a list of...
2015-04-30
1,644 reads
I was dealing with a challenging dynamic sql procedure that allowed a .NET app to pass in a list of...
2015-04-30
852 reads
When restoring a database that doesn’t exist, say for instance when a client sends a database to you, you can’t...
2015-04-28
278 reads
When restoring a database that doesn't exist, say for instance when a client sends a database to you, you can't...
2015-04-28
2,361 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