Powershell Quick Parameters for Scripts
I was working on a script recently to manage a particular process and wanted to make it generic by allowing...
2015-02-19
1,192 reads
I was working on a script recently to manage a particular process and wanted to make it generic by allowing...
2015-02-19
1,192 reads
Why the SQL Server is running slow ?
What are the processes running currently on SQL SERVER instance ?
Many other like...
2015-02-19
440 reads
I keep getting questions on what is improved other than the increased number of secondaries(8 now) with AlwaysOn Availability Group(AG) in...
2015-03-02 (first published: 2015-02-19)
7,987 reads
I just returned home from this year’s SQL Cruise in the Caribbean. WOW!
This trip was our first SQL Cruise, but it...
2015-02-19
809 reads
After my last post on parsing the XML, I decided to continue forward and get ready to put the data...
2015-02-18
898 reads
In an effort to understand Power BI and all the products it encompasses, I have made this slide deck to...
2015-02-18
1,114 reads
VMware has announced the list of 2015 recipients of the vExpert award, and I am humbled and honored to have been...
2015-02-18
378 reads
A slightly different topic today.
Once you have built up knowledge, you become the person that people ask to solve things....
2015-03-02 (first published: 2015-02-18)
6,613 reads
Recently, Mike Walsh and John Sterrett teamed up with Embarcadero to give a 60 minute presentation focusing on the skills...
2015-02-18
1,848 reads
This isn’t so much of a best practice, it comes more under the heading of being careful. Let’s say you...
2015-02-18
2,239 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