Ghosts in your Database
Yes Virginia, there are ghosts in your database. More specifically, there are ghosts in your SQL Server database. They are...
2018-12-10 (first published: 2018-11-26)
2,574 reads
Yes Virginia, there are ghosts in your database. More specifically, there are ghosts in your SQL Server database. They are...
2018-12-10 (first published: 2018-11-26)
2,574 reads
(Be sure to checkout the FREE SQLpassion Performance Tuning Training Plan - you get a weekly email packed with all the...
2018-12-06 (first published: 2018-11-26)
2,332 reads
Part of the decision of setting up a non profit is committing to a bit more than minimal effort when...
2018-12-07 (first published: 2018-11-26)
1,732 reads
AdvertisementsTroubleshooting steps to do when we cannot start SQL service and receive this alert.
Run –> eventvwr –> windows log –> system and filter...
2018-11-26
1,169 reads
Much like your paycheck, this post is two weeks after the fact. But also like your paycheck, it’s got a good deal of personal importance. I’ve taken a couple...
2018-11-25
18 reads
Much like your paycheck, this post is two weeks after the fact. But also like your paycheck, it’s got a good deal of personal importance. I’ve taken a couple...
2018-11-25
14 reads
In this article we learn migrating SQL Database To Azure SQL Instance using Microsoft Database Migration Assistant (DMA) Tool. In this article, I have explained this as a step...
2018-11-25
43 reads
In this article we learn migrating SQL Database To Azure SQL Instance using Microsoft Database Migration Assistant (DMA) Tool. In...
2018-11-25
380 reads
Since SQL Server 2014 SP1 we’ve had DMV’s that can support Live Query Statistics (Basically a query plan that gives...
2018-12-06 (first published: 2018-11-24)
3,478 reads
Since SQL Server 2014 SP1 we’ve had DMV’s that can support Live Query Statistics (Basically a query plan that gives...
2018-11-24
250 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