TSQL Tuesday #127 Invite – Non SQL Tips and tricks
How about for this months TSQL Tuesday let’s do another month of tips and tricks. But just to be a ... Continue reading
2020-06-02
39 reads
How about for this months TSQL Tuesday let’s do another month of tips and tricks. But just to be a ... Continue reading
2020-06-02
39 reads
The other day I had a brief conversation with Itzik Ben-Gan (about|twitter) on twitter and I have to tell you ... Continue reading
2020-05-26
144 reads
A good friend of mine (Randolph West (blog|twitter) asked that someone Explain CROSS APPLY like they are 5. So, here’s ... Continue reading
2020-05-25 (first published: 2020-05-11)
1,831 reads
The other day I got this rather interesting error while connecting to an Azure SQL DB. I was connecting using ... Continue reading
2020-05-20
110 reads
An interesting question came to my attention the other day. A strange operation problem in SQL Server: -100/-100*10 = 0 ... Continue reading
2020-05-18
419 reads
The other day I had a random thought. I wonder if there is a version of Azure Portal for Android. ... Continue reading
2020-05-13
81 reads
When connecting to a SQL Server instance sometimes you’ll see (local), localhost or even just a single period (hard to ... Continue reading
2020-05-12 (first published: 2020-04-27)
389 reads
This is an interesting error that you’ll occasionally get when accessing an AD/Windows ID. Msg 15404, Level 16, State 11, ... Continue reading
2020-05-06
180 reads
I ran into an interesting problem today. I needed to find out the pricing tier of an Azure SQL DB ... Continue reading
2020-05-06 (first published: 2020-04-22)
464 reads
A few months ago I suggested writing blog post(s) as a great way to learn and document your progress (among ... Continue reading
2020-05-04
34 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