SQL Server 2016: The Coolest New Feature – Live Query Stats
This is the first in a series of blog posts about how great SQL Server 2016 is, and why you should...
2017-02-23
1,498 reads
This is the first in a series of blog posts about how great SQL Server 2016 is, and why you should...
2017-02-23
1,498 reads
There is a new website from PASS. Go to Pass.org instead of SQLPass.org. The change does not really concern me...
2017-02-23
483 reads
Join Webinar on SQL Server 2016 - Always Encrypted / Security. Thu 2/23/2017 from 12 PM to 1 PMSQL Server has had ways to encrypt data in the past - for...
2017-02-23
18 reads
Join Webinar on SQL Server 2016 - Always Encrypted / Security. Thu 2/23/2017 from 12 PM to 1 PM
SQL Server has had ways to...
2017-02-23
666 reads
In several of my last few blog posts, I’ve shared several methods of getting internal information from a database by...
2017-02-22
430 reads
[read this post on Mr. Fox SQL blog] [UPDATED 7 JUN 2020 – ADDED NEW TEXT ANALYTICS v3.0 FEATURES!] Just last week we had the fantastic opportunity to present at Microsoft...
2017-02-22
18 reads
One question constantly comes up; What should the Cost Threshold for Parallelism be? The default value of 5 is pretty...
2017-02-22 (first published: 2017-02-20)
2,517 reads
It took me quite a while to figure out how to sign a SQL Server CLR Assembly (like a CLR...
2017-02-22 (first published: 2017-02-21)
6,872 reads
DMV: sys.dm_db_stats_histogram (object_id, stats_id)
For a long time, the DBCC SHOW_STATISTICS command was the only way to get information about statistics....
2017-02-22
1,013 reads
I just wanted to remind everyone that the SQL Saturday in Chicago is coming up, and that both Adam Machanic...
2017-02-22
353 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