Modifying SQL Server Synonyms – this time with Powershell
So, how do you recover from the Holidays? Hot Cocoa by the fire? Relaxing evening with your spouse watching an...
2011-12-26
1,619 reads
So, how do you recover from the Holidays? Hot Cocoa by the fire? Relaxing evening with your spouse watching an...
2011-12-26
1,619 reads
Identifying current service pack installed for SQL Server can be difficult if you don’t know which command to use! Most...
2011-12-25
2,796 reads
Since the stable and mainly feature-complete versions of SQL Server 2012 have been available, I have been heads-down on multiple...
2011-12-25
748 reads
2011 is nearly over. It’s time to list the Top 10 viewed SQLServer-DBA.com posts for the year , based on Views.
System...
2011-12-24
829 reads
SQL Server 2012 has many new security features, and three of the bigger new features are: Default Schema for Windows Groups,...
2011-12-23
1,973 reads
Welcome to the Friday Re-Blog summary post. The aim of these posts is to bring some old posts that newer readers may...
2011-12-23
529 reads
January 8th, 2012 will be the first SQL Saturday for 2012. 104 SQL Saturdays is an amazing number for our...
2011-12-23
762 reads
Basics QA on Extended Event
I am learning Extended Event so this is my first blog on extended event, There is...
2011-12-23
1,803 reads
Many of you DBAs DB Devs and BI Devs in these days can have some changes from one SQL Server...
2011-12-23
1,461 reads
Indeed the Holiday Season is traditionally a season of giving, and being charitable to those who are less fortunate. Although giving...
2011-12-23
1,696 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