A Collection of SQL Server Help Scripts
[read this post on Mr. Fox SQL blog] Like probably every SQL DBA, consultant, architect etc etc out there that has ever worked on or used SQL Server they will likely have...
2017-03-13
23 reads
[read this post on Mr. Fox SQL blog] Like probably every SQL DBA, consultant, architect etc etc out there that has ever worked on or used SQL Server they will likely have...
2017-03-13
23 reads
[read this post on Mr. Fox SQL blog]
Like probably every SQL DBA, consultant, architect etc etc out there that has ever worked...
2017-03-13
1,537 reads
In my last post I showed how to add a T-SQL Job step to an existing SQL Agent Job. The...
2017-03-13
1,151 reads
The 11th cumulative update release for SQL Server 2014 SP1 is now available for download at the Microsoft Downloads site. Please...
2017-03-13
504 reads
Less than a week to go until SQLSaturday Iceland now, it’s going to be a busy couple of months for...
2017-03-13
268 reads
A couple of weeks back I installed SQL Server 2016 on my personal machine, including SSAS Tabular. Yesterday I created...
2017-03-13 (first published: 2017-02-28)
2,009 reads
Redgate has released a new product, SQL Clone. I’ve already talked about how excited I am about it. Now, it’s...
2017-03-13 (first published: 2017-03-06)
1,759 reads
Are you a software developer?
Did you ever get to develop a software that works with a Microsoft SQL Server database?
...
2017-03-13
811 reads
I love tSQLt. It’s a good way to write tests that can determine if your code is actually working. Since...
2017-03-13
1,150 reads
Today I was reading William Durkin‘s fine post on Presentation Mode in SSMS vNext when inspiration struck.
One of the things that...
2017-03-13
517 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...
Nitazoxanide 500 mg Buy Online is a search term used by people looking for...
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