Backup your SQL Server jobs using PowerShell script
This post will help you create a SQL Server job to backup all the jobs in a SQL Server Agent...
2015-05-06
195 reads
This post will help you create a SQL Server job to backup all the jobs in a SQL Server Agent...
2015-05-06
195 reads
In what spare time I’ve had this week, I’ve been watching the news coming out of Microsoft Ignite (formerly Tech...
2015-05-06
4,745 reads
Most people prefer to have “sa” account as the database owner, primary reason being sa login cannot be removed/deleted unlike any...
2015-05-05
399 reads
If you’re in the Iowa City area, come to Iowa Code Camp this weekend! They have a great lineup of speakers, covering...
2015-05-05
419 reads
Intro
AlwaysOn availability groups are a powerful enhancement to SQLServer HA, and offer many improvements over older database synchronization techniques like...
2015-05-15 (first published: 2015-05-05)
6,882 reads
As a DBA , migration of database is a part of day to day activities. sometime its a quite hectic task...
2015-05-05
16,779 reads
Earlier this year, my buddy Dan recommended that I read The Checklist Manifesto: How to Get Things Right. The recommendation...
2015-05-05
534 reads
It was announced yesterday at the Ignite conference that we’ll be getting a summer preview of SQL Server 2016. With...
2015-05-05
680 reads
My recent post on using the new DiskSpd utility to help you benchmark your storage is a great primer on how...
2015-05-14 (first published: 2015-05-05)
7,673 reads
I live for questions. And my favorite questions are the ones where I’m not completely sure of the answer. Those...
2015-05-13 (first published: 2015-05-05)
5,937 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