T-SQL Tuesday 108 Invitation- Non SQL Server Technologies
I am proud and honored to be hosting T-SQL Tuesday again. This monthly blog party started by SQL Guru Adam...
2018-10-29
328 reads
I am proud and honored to be hosting T-SQL Tuesday again. This monthly blog party started by SQL Guru Adam...
2018-10-29
328 reads
In addition to being an amazing opportunity for both technical and professional development, PASS Summit is a #sqlfamily reunion and a huge networking event. Catching up with old friends,...
2018-10-29
35 reads
G’day,
One of the things that I’ve been seeing more often than I would like to lately is large databases with...
2018-11-06 (first published: 2018-10-28)
3,204 reads
Introduction
Setting up an email alert is as simple as creating a Windows Task that is triggered by an Event. You...
2018-10-28
1,812 reads
Welcome to the new home of my blog! I’ve had this domain for over a year but with PASS Summit 2018 coming up soon I decided it was time...
2018-10-28
19 reads
This article on the SQL Insert statement is part of a series on string manipulation functions, operators and techniques. The...
2018-10-26
387 reads
(Be sure to checkout the FREE SQLpassion Performance Tuning Training Plan - you get a weekly email packed with all the...
2018-10-25
413 reads
This post is password protected. You must visit the website and enter the password to continue reading.
Advertisements
2018-10-25
233 reads
One of the common goto methods for query specific slowness which can be replicated via an application can be to...
2018-11-05 (first published: 2018-10-24)
2,231 reads
I ran into this error recently while trying to clone a production database:
Msg 2601, Level 14, State 1, LineNumber
Cannot insert duplicate...
2018-11-02 (first published: 2018-10-24)
3,796 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