Undocumented use of the Columns_Updated() function
Q I need an easy way to see if a delete transaction has fired a trigger. Do you have any...
2007-08-01
639 reads
Q I need an easy way to see if a delete transaction has fired a trigger. Do you have any...
2007-08-01
639 reads
Some of you younger DBA’s out there may not know who Neil Sedaka is or remember his poignant words "Breaking...
2007-07-03
630 reads
Breaking Up is Easy to DoHardIt's nice to be able to package a process into a single, tidy, elegant query,...
2007-07-03
640 reads
No, I'm not going to keep making corny references to war and being a soldier. But in many ways, we...
2007-06-29
1,355 reads
The active SQL Server error log is one of the first places people look when there is a problem. For...
2007-06-29
1,608 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