Rochester – Welcome to the PASS MN Family
It started as a vision for expanding the reach of the Minnesota SQL Server User Group a year ago. At...
2014-01-23
683 reads
It started as a vision for expanding the reach of the Minnesota SQL Server User Group a year ago. At...
2014-01-23
683 reads
This is part of my Powershell Challenge, to learn more about PowerShell (PoSh) using the Learn Windows Powershell 3 in a Month...
2014-01-22
872 reads
Today, I received email from one of my blog follower asking if there is any DMV or SQL script, which...
2014-01-22
2,317 reads
It’s awfully comforting to see all those backup and maintenance jobs in your SQL Agent list, isn’t it? It’d be...
2014-01-22
540 reads
This is a fairly simple thing to do, but I had to look it up the other day and thought...
2014-01-22
1,403 reads
The 8th cumulative update (CU8) for SQL Server 2012 Service Pack 1 is now available for download at the Microsoft...
2014-01-22
517 reads
Last night I submitted my application to volunteer for the 2014 PASS Summit Program Committee.
Not know what PASS is? head...
2014-01-22
1,190 reads
While researching my last post I ran across an interesting column I hadn’t noticed before, sys.dm_exec_connections.most_recent_sql_handle. I mentioned it in...
2014-01-22
1,099 reads
This is something I've found useful here recently when I had a server acting up. It's a simple way to...
2014-01-22
1,057 reads
I often use these scripts to check on the backups of all databases in an unfamiliar SQL Server instance, regardless...
2014-01-22
562 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