Yet one more quick and easy performance tuning setting
I blogged in the past about two simple commands that can be a big help in performance tuning SET STATISTICS...
2015-06-01
635 reads
I blogged in the past about two simple commands that can be a big help in performance tuning SET STATISTICS...
2015-06-01
635 reads
I’m a fixer. A tinkerer. As a kid, I would take my toys apart just to see how they worked,...
2015-06-01
1,553 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
User-defined functions encapsulate T-SQL statement and return a table or a scalar value to the caller. UDFs can not be...
2015-06-01
378 reads
2015-05-31
1,255 reads
Hi friends, in this blog we will learn how to get information about database mail account using stored procedure sysmail_hep_account_sp....
2015-05-30
875 reads
Here’s a quick how-to on returning temporal data set that includes missing dates. Suppose you are tasked to query an...
2015-05-29
16,373 reads
This past Wednesday, I delivered my session, “Query Progress Tracking in SQL Server” to the DBA Virtual Chapter.
The session covers...
2015-05-29
1,427 reads
Reading Time: 4 minutesAre You Running An Antiques Roadshow? In WOxPod!, episode # 005 –...
The post 005 – Antiques Roadshow appeared first...
2015-05-29
1,102 reads
Hi all Yeah its true microsoft announced SQL server 2016 and CP2 has been released to public also we can...
2015-05-29
1,223 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