Speaking? You? Go on. #tsql2sday #84
This is a blog post for this month’s T-SQL Tuesday post, hosted by Andy Yun (b|t). T-SQL Tuesday is a monthly...
2016-11-08
384 reads
This is a blog post for this month’s T-SQL Tuesday post, hosted by Andy Yun (b|t). T-SQL Tuesday is a monthly...
2016-11-08
384 reads
For my own amusement and also to show my wife where I have been I use the Swarm check-in app...
2016-11-03 (first published: 2016-10-29)
2,185 reads
I have just got back to the UK from Singapore following the amazing PSConfAsia conference. I must say that Matt,...
2016-10-24
535 reads
If you are a SQL DBA you will have heard of Ola Hallengrens Maintenance solution If you haven’t go and...
2016-10-04 (first published: 2016-09-24)
3,772 reads
When you look in msdb for the SQL Agent Job duration you will find that it is an int.
This is...
2016-09-15 (first published: 2016-09-12)
1,499 reads
My wonderful friend Chrissy LeMaire and I are the creators of two GitHub repositories for SQL Server and PowerShell called...
2016-09-14
780 reads
I love to speak about PowerShell. I really enjoy giving presentations and when I saw Start-Demo being used at the...
2016-08-29
544 reads
What is DBA Tools?
A collection of modules for SQL Server DBAs. It initially started out as ‘sqlmigration’, but has now...
2016-07-20
1,024 reads
So with the July Release of SSMS everything changed for using PowerShell with SQL. You can read the details here...
2016-07-14 (first published: 2016-07-03)
3,503 reads
The post on the SQLServer blog at TechNet by the SQL Server Tools Team today made me jump out of...
2016-06-30
1,010 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