SQL Server Diagnostic Information Queries for April 2014
I made some small improvements to a few of the queries this month. I plan to add several more SQL...
2014-04-28 (first published: 2014-04-18)
4,385 reads
I made some small improvements to a few of the queries this month. I plan to add several more SQL...
2014-04-28 (first published: 2014-04-18)
4,385 reads
I made a couple of changes in the order of the queries this month and made some other small improvements...
2014-03-11
1,695 reads
On February 17, 2014, Microsoft released SQL Server 2008 R2 SP2 CU11, which is Build 10.50.4302. This cumulative update has...
2014-02-21
1,400 reads
I will be travelling to Copenhagen, Denmark to deliver a full day pre-con for SQLSaturday #275 on Friday, March 28,...
2014-02-12
965 reads
I improved the file-level latency query this month and made some other small improvements to a few other queries. Rather...
2014-02-06
1,187 reads
As we get closer to the end of mainstream support for both SQL Server 2008 and SQL Server 2008 R2...
2014-02-03 (first published: 2014-01-27)
2,503 reads
I spent some time this month to true up the SQL Server 2005 version, with the other versions for the...
2014-01-14
1,079 reads
The WordPress.com stats helper monkeys prepared a 2013 annual report for this blog.
Here’s an excerpt:
The Louvre Museum has 8.5 million...
2013-12-31
1,195 reads
Microsoft has released SQL Server 2008 R2 Service Pack 2 Cumulative Update 10, which is build 10.50.4297. This Cumulative Update...
2013-12-17
1,460 reads
I have made quite a few updates and improvements to this set of queries for December 2013. I have added...
2013-12-17
956 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