A Week from Omaha–SQL Saturday #197
Next week I head out to SQL Saturday #197 in Omaha NE. I’m looking forward to it as I’ve never...
2013-03-25
978 reads
Next week I head out to SQL Saturday #197 in Omaha NE. I’m looking forward to it as I’ve never...
2013-03-25
978 reads
For those that follow me on twitter (@StrateSQL), you’ll know that throughout the day I tweet out some links of...
2013-03-25
1,102 reads
This is an uncommon task but one that does turn up every once in awhile. A SQL login has to...
2013-04-03 (first published: 2013-03-25)
9,626 reads
The 10th cumulative update release for SQL Server 2008 Service Pack 3 is now available. Cumulative Update 10 contains all...
2013-03-25
724 reads
Microsoft has stated pretty clearly that they’re putting code on Azure first, ahead of the desktop. Which makes one wonder...
2013-03-27 (first published: 2013-03-25)
3,642 reads
I recently encountered an interesting performance issue (due to implicit conversions) that I was able to solve using a lesser known technique and I wanted to share it with...
2013-03-25
39 reads
I recently encountered an interesting performance issue (due to implicit conversions) that I was able to solve using a lesser known...
2013-04-02 (first published: 2013-03-25)
3,979 reads
There are different options available when you want to execute a .sql script file on a server. You can open...
2013-03-25
9,774 reads
I recently implemented an MDX expression to count the number of weekdays in a given timeframe. This logic is likely...
2013-03-25
2,746 reads
It has been a long journey to the final day my 31 Days of Disaster Recovery series, but we have...
2013-03-28 (first published: 2013-03-25)
2,436 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