2020-11-12
492 reads
2020-11-12
492 reads
Losing your instance might result in the need to get information from what you have. Steve Jones looks at a way to get the proper version and patch, and database list, from what limited resources you might have.
2020-10-27
2,725 reads
2020-10-13
421 reads
2020-10-09
422 reads
2020-10-06
395 reads
2020-09-29
455 reads
2020-09-17
422 reads
2020-08-13
451 reads
Introduction We are now in the data era – data is growing at rapid space, being processed in different ways, and becoming more distributed across data centers and clouds. Thus databases are also growing and they are stored and protected in various ways depending on business objectives. As more organizations continue to move application and […]
2020-08-10
2,395 reads
2020-07-30
600 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