SQL Server A to Z – Views
Happy Wednesday folks! Hope everyone’s having a great week. This episode of SQL Server A to Z is brought to...
2011-11-16
1,088 reads
Happy Wednesday folks! Hope everyone’s having a great week. This episode of SQL Server A to Z is brought to...
2011-11-16
1,088 reads
One of the mistakes I see a lot is teams failing to identify risks early and failing to leave time...
2011-11-16
487 reads
This is a continuation of my DBA in Space journal.
Friday, September 16, 2011
OMG. (This is the first time in my...
2011-11-16
619 reads
Home Sweet Cubicle
If you are looking for a little training on SQL Server Integration Services (SSIS) without having to leave...
2011-11-16
615 reads
At the urging of a friend, this script is being updated for those that are dealing with Case Sensitivity. The first few rounds, I neglected Case Sensitivity and never...
2011-11-16
23 reads
At the urging of a friend, this script is being updated for those that are dealing with Case Sensitivity. The...
2011-11-16
609 reads
Introduction
Triggers can be defined as the database objects which perform some action for automatic execution whenever users try to do execute...
2011-11-16
12,915 reads
Recently, while doing some data scrubbing for a customer I got an interesting error in SSMS with one of my...
2011-11-16
1,895 reads
I’ve been looking at some security code in preparation for a few talks I plan on doing next year and...
2011-11-15
1,220 reads
DB Security Workshop @ Oracle Montreal
I have
dedicated several posts on the importance of being a Data Steward, and the
consequences of not...
2011-11-15
1,749 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