SQL Server – Reading BACPAC Files
If you have been reading my blog for a while now you would know that a common technique to move...
2018-10-19
278 reads
If you have been reading my blog for a while now you would know that a common technique to move...
2018-10-19
278 reads
In this article I continue to explore the ways to secure the data via contextual views and describe the technique...
2018-10-18
553 reads
Windows Performance Counter Alerts can be configured to be triggered on any Performance Monitor (Perfmon) Counter through the use of...
2018-10-18
1,655 reads
In this post we will discuss how to fetch data from a large dataset for web applications using pagination technique....
2018-10-17
426 reads
Tempting headline, isn’t it? It might even seem like clickbait, but that’s not the intention. The SQL Server default configuration...
2018-10-17
305 reads
I still use sp_help_revlogin to transfer logins between servers. I know there are other options, including a set of Powershell...
2018-10-30 (first published: 2018-10-17)
7,781 reads
For a long time there I would see the Object Explorer Details tab show up when I opened SSMS (SQL...
2018-10-17
288 reads
At the last few events I attended, I’ve gotten into conversations on how to begin as a speaker. So I...
2018-10-17
343 reads
2018-10-17
208 reads
This post helps in deciding between choosing foreign key and check constraints in case we need to constraint the data...
2018-10-16
463 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