Detach and Attach All User Databases
Sometimes you are in a scenario where you need to transfer a large number of databases from one server to...
2015-05-29
1,127 reads
Sometimes you are in a scenario where you need to transfer a large number of databases from one server to...
2015-05-29
1,127 reads
SQL Server 2016 CTP2 public build was released by Microsoft yesterday, and if you haven’t downloaded it yet, then drop everything(No,...
2015-05-29
3,262 reads
I earned my MCSE: Business Intelligence Certification on May 27, 2015. It was a long road, but I did it....
2015-05-28
1,524 reads
Whenever it is time to install a service pack every DBA silently hopes that nothing will go wrong. I would...
2015-05-28
2,106 reads
I attended the online Town Hall yesterday, the second one that PASS has held this year. The recording should be...
2015-05-28
859 reads
With the CTP2 of SQL Server 2016 now released you may be eager to try it out. One of the...
2015-05-28
2,485 reads
So now that SQL Server 2016 CTP2 is released to the public we can all finally play with all the...
2015-05-28
3,154 reads
A question came up at work the other day, mostly as a mind game, but you never know it might...
2015-06-08 (first published: 2015-05-28)
1,861 reads
By David Postlethwaite
On the Database Scale page we can decide on the performance level that we want our database to...
2015-05-28
1,038 reads
For those who haven’t noticed already:
SQL Server 2016 CTP2 (or Preview as some call it) has just been released!
This means...
2015-06-01 (first published: 2015-05-28)
3,287 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