2023-02-20
507 reads
2023-02-20
507 reads
2022-10-18 (first published: 2022-10-14)
459 reads
2022-10-07
503 reads
2022-10-05
592 reads
What does fragmentation mean? How does it happen? Can you fix it with fill factor? Should you rebuild your indexes to fix it?
2022-09-26
2022-09-16
398 reads
Learn how to use the system function, FILEPROPERTY(), to get information about your database in T-SQL.
2022-09-09
4,377 reads
Recently I was testing a feature in SQL Server on 2017 and 2019. There was supposed to be an improvement across versions, but I didn't see it. Then I realized that I was on SQL Server 2019 CU 2 on my laptop, and the current CU is 17. I took a few minutes to download […]
2022-08-20
191 reads
Get more information from the string or binary data truncated message to help troubleshoot data problems on SQL Server 2016, 2017, and 2019.
2022-08-17
9,468 reads
2022-08-03
488 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