Using Azure for free
There are a number of options for using Azure for free. This is very useful for those of you who...
2017-04-11
606 reads
There are a number of options for using Azure for free. This is very useful for those of you who...
2017-04-11
606 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,667 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
This post is a response to this month's T-SQL Tuesday prompt. T-SQL Tuesday was created by Adam Machanic and is a way for SQL users to share ideas about...
2017-04-11
18 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
Its been an interesting weekend at gethynellis.com I have been attempting to put together a SQL Server YouTubechannel. I’m planning...
2017-04-10
321 reads
Today I had the wonderful pleasure for leading a discussion regarding the products, services, and tools Microsoft provides in the...
2017-04-10
334 reads
Today I had the wonderful pleasure for leading a discussion regarding the products, services, and tools Microsoft provides in the...
2017-04-10
110 reads
Missing index :- Scripts will help you to get all the missing index and prepare script for new index.
/*
Description:- This Query...
2017-04-10
682 reads
So SQLBits is over and I have to say that I really enjoyed attending on the Saturday, hopefully next year...
2017-04-10
303 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