Another Brick in the Wall–T-SQL Tuesday #105
It’s that time again, and this month we have a good topic from Wayne Sheffield. We’re asked about getting stuck,...
2018-08-14
1,059 reads
It’s that time again, and this month we have a good topic from Wayne Sheffield. We’re asked about getting stuck,...
2018-08-14
1,059 reads
It’s official! I will be speaking at the inaugural PowerHour online lightning demo event on Tuesday, August 21st at 2200 UTC. I’ll be demoing Better, Safer SQL Queries from...
2018-08-14
21 reads
A few weeks ago, I teased good news.
just got some good news. can't wait to share it
— Andy Levy (@ALevyInROC) July 20, 2018 One person hypothesized that I’m...
2018-08-14
16 reads
Query Store is a very powerful tool for performance tuning, if you are not using it already you should!! It...
2018-08-29 (first published: 2018-08-13)
2,093 reads
Probably the single most important factor when deciding which query to tune, or actively tuning a query, is how you...
2018-08-28 (first published: 2018-08-13)
2,743 reads
When you take a new job in software engineering or in IT, within the paperwork there often lurks an employee agreement: a contract between you and your employer. In...
2018-08-13
28 reads
As much as I liked the ability to quickly and easily build development and test databases with SQL Provision, I...
2018-08-31 (first published: 2018-08-13)
2,635 reads
In July there were many exciting new features that were released to Power BI, but perhaps the most eagerly awaited...
2018-08-28 (first published: 2018-08-13)
3,015 reads
There are many times you as DBA or Developer needs to get all row count from all tables or row...
2018-08-13
8,286 reads
Imagine you are driving somewhere – to work, to the mall, wherever – and you encounter a massive traffic jam. Wall-to-wall, bumper-to-bumper,...
2018-08-24 (first published: 2018-08-12)
2,036 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