Using Twitter with VS Code
So today I saw this tweet from Mathias in reply to Stefan and Amanda
That looks cool. Twitter in VS Code, one...
2017-04-28 (first published: 2017-04-19)
1,016 reads
So today I saw this tweet from Mathias in reply to Stefan and Amanda
That looks cool. Twitter in VS Code, one...
2017-04-28 (first published: 2017-04-19)
1,016 reads
I was chatting on the SQL Community Slack with my friend Sander Stad b | t about some functions he is writing for...
2017-04-26
450 reads
A good security practice is to backup our SQL Servers to a network share but not allow users to be...
2017-04-13 (first published: 2017-04-08)
1,397 reads
Last week I was showing a co-worker some PowerShell code and he asked what the editor was that I was...
2017-04-13
476 reads
In previous posts I have shown how to use Test-DbaLastBackup from dbatools and how you can make use of the...
2017-04-11 (first published: 2017-03-25)
1,668 reads
WARNING – Contains Orange and light-hearted photos
I have returned home from SQLBits 2017 The Disco Edition. I am exhausted, my...
2017-04-11
557 reads
There are times when DBA’s are required to export database user permissions to a file. This may be for a...
2017-04-10
2,380 reads
SQL Server uses identity columns to auto generate values, normally keys. When you create an identity column, it has a...
2017-04-07
570 reads
With the release of SQL Server vNext CTP 1.4 SQL Agent was released for use on Linux. To install it...
2017-04-06 (first published: 2017-03-22)
1,870 reads
In my last post I showed Get-DbaLastGoodCheckDb from dbatools. This module is a community based project written by excellent, brilliant...
2017-04-06
545 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