Why you may or may not consider using Database Snapshots!
Microsoft introduced database snapshots with SQL Server 2005. A database snapshot is a static, read-only copy of a source database...
2011-12-17
8,274 reads
Microsoft introduced database snapshots with SQL Server 2005. A database snapshot is a static, read-only copy of a source database...
2011-12-17
8,274 reads
Last week I heard about a new blog party/meme coming down the pipe for the #SQLFamily. This new meme is Meme15 and is the pet project of Jason Strate (Blog|Twitter)....
2011-12-17
11 reads
Last week I heard about a new blog party/meme coming down the pipe for the #SQLFamily. This new meme is...
2011-12-17
709 reads
We come across a situation where we have to kill one spid which was running for quite some time, so...
2011-12-17
3,567 reads
Today, I’m so excited to announce that we had the first meeting of our Users Group – Albanian SQL Server Users...
2011-12-17
1,333 reads
Replication often plays an important part in your database management strategy. An organization may use database replication for load balancing,...
2011-12-17
2,286 reads
As we know xp_fixeddrives can only be use to retrieve normal fixed drives space information. It cannot be used to retrieve information...
2011-12-16
2,061 reads
I’ve started my own SQL blog. Hopefully I’ll write some interesting SQL blog posts here soon.
2011-12-16
545 reads
Got stored procedure problems? I feel sorry for you son.
Here's a quick query to pull the cached execution plan out...
2011-12-16
1,713 reads
This news may be a few months old, but it is worth noting that there is now a column called...
2011-12-16
1,401 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