Technical Presentations - What happen's behind the scene
A while ago I wrote a piece on public speaking assignements over here and promised to write what it takes to...
2016-10-27
399 reads
A while ago I wrote a piece on public speaking assignements over here and promised to write what it takes to...
2016-10-27
399 reads
Introduction to Query Store covered here.
Now for the second part on “How to Configure?”
Query Store is configured at the...
2016-10-24
988 reads
Most of you would know how to get the query plan from the cache via "sys.dm_exec_cached_plans" or "sys.dm_exec_query_stats" DMV or...
2016-10-17
970 reads
Today's post is about a simple but very useful query.
One of the basic things one needs to check is the...
2016-10-12
3,149 reads
Query Store is perhaps one of the path breaking features to release in SQL Server 2016. This post will give...
2016-10-09
553 reads
Many of us use the stored procedure "sp_recompile" to mark the stored procedure for recompilation, so that next time it...
2016-10-06
1,126 reads
Following script is perhaps the most executed script in my 10 year Database Administration career. The script has been my...
2016-08-11 (first published: 2016-08-07)
3,085 reads
I am very happy and proud to share the news that I will be speaking in SQL Server Geeks Annual...
2016-07-25
423 reads
Dear All,
It has been a while since I became less active on this blog. Reason for the same being that,...
2016-06-12
404 reads
Continuing from our series on Cardinality Estimator 2014, Let us look at the first difference between 2 CE models. The...
2016-04-21 (first published: 2016-04-12)
2,018 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