Adding a PowerShell Job Step to an existing SQL Agent Job Step with PowerShell
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
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
This weekend I set up some SQL vNext virtual machines, two on Windows and one on Linux so that I...
2017-03-07 (first published: 2017-02-27)
2,110 reads
In my last post, I explained how to alter an existing job step across many servers. I also had cause...
2017-02-23 (first published: 2017-02-20)
3,168 reads
I flew to Utrecht last week to present with Chrissy LeMaire and Sander Stad to present to the joint Dutch...
2017-02-13
430 reads
Whilst having a conversation with Chrissy LeMaire last week about using the SQL Provider. She asked if it could use SQL...
2017-01-12
2,069 reads
Reading this blog post by Shawn Melton Introduction of Visual Studio Code for DBAs reminded me that whilst I use...
2017-01-10 (first published: 2017-01-05)
6,049 reads
SQL Saturday Vienna 2017 is only just around the corner.
On Friday, January 20, 2017, a lot of local and international...
2017-01-09
411 reads
Its the time of year for reflection and I have had the most amazing 2016, I am blessed that I love...
2017-01-02
503 reads
This weekend (10 December 2016), I went to Slovenia for a SQL Saturday. As always, it was an amazing event...
2016-12-18
833 reads
Last week at the Birmingham user group I gave a presentation about PowerShell and SQL Server
It was a very packed...
2016-11-16 (first published: 2016-11-13)
1,840 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