Quickly Change SQL Job Owners
It is not unusual to find a server where some random user created a bunch of jobs to be run by SQL Agent. Sometimes, the user creating the job(s)...
2018-07-16
19 reads
It is not unusual to find a server where some random user created a bunch of jobs to be run by SQL Agent. Sometimes, the user creating the job(s)...
2018-07-16
19 reads
We all have our favorite scripts, tools or utilities. Those are the things that help make our jobs easier. In this article, I share with you a poor mans...
2018-07-10
21 reads
Migrating a wordpress blog comes with its various set of challeneges. This installment covers magically changing percent symbols during that migration.
Related Posts:
Summiting that Technical Challenge January 9, 2018
T-SQL...
2018-07-06
18 reads
Conquering Challenges
Months ago, I posted an article about some of the challenges encountered while migrating from one service level to...
2018-07-06
754 reads
One of the tasks I find myself doing on a fairly regular basis is running SSMS as a different Windows...
2018-07-06 (first published: 2018-06-28)
2,693 reads
Runas should be a very common tool in the toolbox of all IT professionals - not just Data Professionals. Learning how to test different accounts is essential to being...
2018-06-28
303 reads
Starting SQL Server in single-user mode should be a tool every data professional holds in the bag. This is an essential tool that can be used in multiple scenarios...
2018-05-31
320 reads
In a recent article, I took you on a trip through how to hack (ethically) a SQL Server to regain...
2018-05-31
588 reads
As a data professional can you recall the last time you needed to support a SQL Server instance for which...
2018-05-30
884 reads
Losing access to a SQL instance is never a desirable situation - for the DBA. When the people that are supposed to have access, lose that access, all hope...
2018-05-30
27 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