Restoring Filegroup backups on another server, and why it won't work...
We have 2 different SQL Servers which both have a copy of the AdventureWorks2012 database in Full recovery mode.
One...
2014-02-20
4,982 reads
We have 2 different SQL Servers which both have a copy of the AdventureWorks2012 database in Full recovery mode.
One...
2014-02-20
4,982 reads
I feel like an old man opening a computer for the first time but I’ve finally signed up on twitter....
2014-02-20
514 reads
I met up for lunch with a good friend and former coworker today, and among the topics of discussion was...
2014-02-19
858 reads
Here is an alphabetical list of online mathematics books, textbooks, monographs, lecture notes, and other mathematics related documents freely available...
2014-02-19
615 reads
Hopefully you got the email today from PASS containing these:
Volunteer GoalsProgram GoalsSQLSaturday GoalsReading them I’m first struck that we often...
2014-02-19
635 reads
Years ago when I was just out of the Marine Corps and found myself as the only IT guy in an...
2014-02-19
446 reads
Hello Dear Reader! I know it has been a while since last we spoke. Sorry for the long absence. I've...
2014-02-19
849 reads
The 10 pioneering data scientists listed here were identified as top data scientists in our previous article entitled data science...
2014-02-19
472 reads
Nothing better than finding a script that does something you need done and often done better than what you’d put...
2014-02-19
732 reads
Query plans are an essential tool when doing performance tuning. When looking at a query plan you should be aware...
2014-02-19
1,507 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