String or binary data would be truncated: get the full picture in SQL Server 2017
SQL Server 2019 Preview (CTP 2.0) introduced a long-awaited improvement to an error message that’s been around in SQL Server...
2018-10-31
526 reads
SQL Server 2019 Preview (CTP 2.0) introduced a long-awaited improvement to an error message that’s been around in SQL Server...
2018-10-31
526 reads
Creating a table to be in memory compared to standard tables that use the files on disk can have several...
2018-11-13 (first published: 2018-10-31)
7,794 reads
Did you know compression can gain you more than just space on a disk, it can allow you to fit...
2018-11-13 (first published: 2018-10-31)
2,651 reads
It Halloween so time for a scary SQL story. Ok, maybe not that scary. Ok, not scary at all, but...
2018-11-12 (first published: 2018-10-31)
2,906 reads
The title says it all, this year I have been selected as a speaker at the world’s largest Microsoft Data...
2018-10-31
266 reads
Next week is the week when I used to dread looking at Twitter and especially the #PASSsummit hashtag, watching all of...
2018-10-31
272 reads
In this post I will explain what the DACPAC is and how to create it. In previous post in DevOps...
2018-10-31
2,594 reads
(last updated: 2018-11-01 @ 00:50 EDT / 2018-11-01 @ 04:50 UTC )
SQL Server 2017 introduced a new security restriction for SQLCLR in the...
2018-11-12 (first published: 2018-10-31)
3,408 reads
In my previous blog post of this topic, I talked about the definition of what GDPR is and also described...
2018-11-09 (first published: 2018-10-30)
3,493 reads
A while back I wrote a post, Digitally Signing a Stored Procedure To Allow It To Run With Elevated Permissions
Recently Manish...
2018-11-08 (first published: 2018-10-30)
2,576 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