SQLPSX Developer Blog
Powershell enthusiast, DBA and new SQL Server PowerShell Extensions developer Mike Shepard started a blog. Mike addresses a common question...
2009-09-07
493 reads
Powershell enthusiast, DBA and new SQL Server PowerShell Extensions developer Mike Shepard started a blog. Mike addresses a common question...
2009-09-07
493 reads
I completed a maintenance release of SQL Server PowerShell Extensions, which address all known open issues. This release is still...
2009-09-02
638 reads
At my workplace I use an IT Service Desk application, called well, "Service Desk" from CA. The system is web-based...
2009-08-29
2,518 reads
My co-worker and fellow DBA, Leigh Freijo has a blog entry about a Powershell script he created to re-integrate QA/Development database changes...
2009-08-25
1,110 reads
I presented a one-hour session for Tampabay SQL Server User Group on Powershell and SQL Server. I've previously delivered this session for the...
2009-08-19
834 reads
When Installing SQL Server 2008 on Windows 7 RTM, I encountered a couple of issues. Supposedly you can install SQL...
2009-08-15
800 reads
Although I tend to write a lot of formal scripts, as part of the development process I'll explore an object...
2009-08-12
575 reads
I presented a 1 hr session at SQL Saturday #16 session PowerShell and SQL Server Administration: In this sesssion we...
2009-08-08
465 reads
I'm giving a presentation at SQLSaturday in South Florida on August 8th 2009. If you haven't been to a SQLSaturday,...
2009-07-27
476 reads
Although PowerShell is best suited for console applications there are times when a GUI interface just makes sense, however hand cranking...
2009-07-25
4,184 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