I Have A SQL Login - Why Can't I Connect?
This post is a response to this month's T-SQL Tuesday prompt created by Arun Sirpal. Adam Machanic created T-SQL Tuesday as a way for SQL users to share ideas...
2018-01-09
16 reads
This post is a response to this month's T-SQL Tuesday prompt created by Arun Sirpal. Adam Machanic created T-SQL Tuesday as a way for SQL users to share ideas...
2018-01-09
16 reads
(Be sure to checkout the FREE SQLpassion Performance Tuning Training Plan - you get a weekly email packed with all the...
2018-01-09
370 reads
SQL Server stores the full definition of certain T-SQL objects — Stored Procedures, Functions, Views, and Triggers — in their original form,...
2018-01-09
952 reads
Let’s say you need to create a new SQL Server database, which is going to grow very fast, but you...
2018-01-18 (first published: 2018-01-08)
1,793 reads
There is a growing need for Graph Databases in the market. This is a type of database, which is capable...
2018-01-08
581 reads
Have you ever had a script where you needed to run parts of it on different instances of SQL Server...
2018-01-08
446 reads
Query tuning ain’t easy.
Figuring out which index is getting used is one step, and generally simple, look at the execution...
2018-01-17 (first published: 2018-01-08)
2,258 reads
Some of my previous articles on Python provided insight of the basics and the usage of Python in SQL Server...
2018-01-08
820 reads
Today I found out that it is now possible to enable the setting optimize for ad-hoc workloads at the database...
2018-01-16 (first published: 2018-01-08)
1,615 reads
First blog post of the year and I’d like to take the opportunity to wish everyone the best, professionally and...
2018-01-08
360 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...
Nitazoxanide 500 mg Buy Online is a search term used by people looking for...
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...
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