Power BI in SSRS – T-SQL Tuesday
T-SQL Tuesday is a monthly event where SQL Server bloggers write a post based on a subject chosen by the...
2017-02-21 (first published: 2017-02-14)
6,959 reads
T-SQL Tuesday is a monthly event where SQL Server bloggers write a post based on a subject chosen by the...
2017-02-21 (first published: 2017-02-14)
6,959 reads
Since installing SQL Server vNext CTP 1.3 I found out that there is a new way to return statistics histogram...
2017-02-21
382 reads
The response to our most recent job position was incredible, and I’d like to thank all of the folks who...
2017-02-21
399 reads
An availability group supports a failover environment for a discrete set of user databases, known as availability databases, that fail over together. An availability group supports a set of...
2017-02-20
37 reads
An availability group supports a failover environment for a discrete set of user databases, known as availability databases, that fail...
2017-02-20
78,252 reads
A quick reminder that tomorrow, Feb 21 at 12pm EST, I’ll be hosting another DevOps, Database Lifecycle Management (DLM) webinar....
2017-02-20
716 reads
No rugby on last weekend so I didn’t have anything to distract me from working. On another note, my flat...
2017-02-20
257 reads
If you are dealing with a SQL Server which got a lot of memory, you may encounter the out of...
2017-02-20
1,299 reads
Growing up my mother used this phrase quite a bit. Penny wise, pound stupid. (In case you didn’t know the...
2017-02-20
427 reads
I had a need to setup transactional replication from my SQL Server to SQL Database (Azure) where I only needed...
2017-02-20
395 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