Extended Events Made Easy – Sorting, Grouping and Aggregation
When I’m using Profiler to analyse performance issues I often save the results to a table, or upload a trace...
2018-10-29 (first published: 2018-10-16)
2,132 reads
When I’m using Profiler to analyse performance issues I often save the results to a table, or upload a trace...
2018-10-29 (first published: 2018-10-16)
2,132 reads
At Microsoft Ignite, one of the announcements was for Azure SQL Database Hyperscale, which was made available in public preview October 1st, 2018 in 12 different Azure regions. SQL Database Hyperscale is...
2018-10-16
95 reads
At Microsoft Ignite, one of the announcements was for Azure SQL Database Hyperscale, which was made available in public preview October 1st,...
2018-10-26 (first published: 2018-10-16)
2,398 reads
Table variables, they’re nasty, dirty little things that perform about as well as a Robin Reliant in a crosswind, right? ...
2018-10-25 (first published: 2018-10-16)
2,090 reads
While I normally prefer formatting my query results in a downstream app/reporting layer, sometimes I can’t get around adding some...
2018-10-29 (first published: 2018-10-16)
2,676 reads
Watch this week's video on YouTube
While I normally prefer formatting my query results in a downstream app/reporting layer, sometimes I can't get around adding some business formatting logic to...
2018-10-16
65 reads
Watch this week's video on YouTube
While I normally prefer formatting my query results in a downstream app/reporting layer, sometimes I can't get around adding some business formatting logic to...
2018-10-16
13 reads
(Be sure to checkout the FREE SQLpassion Performance Tuning Training Plan - you get a weekly email packed with all the...
2018-10-25 (first published: 2018-10-16)
3,899 reads
In Joyful Craftsmen we provide, among other things, technical support to our customers, which from time to time involves us...
2018-10-16
879 reads
AdvertisementsI am seeing in more environment the database recovery model is set FULL and there is no transaction log backup...
2018-10-16
300 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