Dedicated Administrator Connection
Recently you may have read my article about some hidden functions in SQL Server. In that article you learned that...
2012-01-19
983 reads
Recently you may have read my article about some hidden functions in SQL Server. In that article you learned that...
2012-01-19
983 reads
SQL Server, Powershell and Excel are a good mix . But saving to Powershell output to HTML is versatile – if requiring...
2012-01-19
863 reads
As I mentioned in a pervious post Master Data Services for SQL 2012 is a huge improvement over the SQL...
2012-01-19
3,613 reads
What comes first, the chicken or the egg? What happens first – update statistics or re-compilations?
The Statistics life cycle
As a regular...
2012-01-18
387 reads
What more can I say. I disagree with the kind of legislation that is being presented via SOPA and PIPA. In support of the community, my site will be...
2012-01-18
8 reads
What more can I say. I disagree with the kind of legislation that is being presented via SOPA and PIPA.
In...
2012-01-18
807 reads
On Tuesday night was the first meeting for PASSMN, the SQL Server User Group in Minneapolis/St. Paul this year. As...
2012-01-18
586 reads
There are some FANTASTIC videos of the sessions from SQLInspire New York 2011. I highly recommend that you check out...
2012-01-18
538 reads
It’s anti-SOPA/PIPA day, and a number of sites have shut down for the day. O’Reilly closed their page, and of...
2012-01-18
1,856 reads
I’m not going to black out my blog, because, let’s face it, who’s going to notice? But for all six...
2012-01-18
1,930 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 Risk Vs Reward, The never...
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...
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