SQL Server articles
Between attending SQL SKILLS immersion events, trying out for the PFE role at Microsoft I have managed to write some...
2016-03-16
193 reads
Between attending SQL SKILLS immersion events, trying out for the PFE role at Microsoft I have managed to write some...
2016-03-16
193 reads
Creating a database in SQL Server running in on-premises with a dedicated storage location for your data in Windows Azure Blob Storage.
2015-09-17
4,302 reads
I have been enjoying XE alot recently ( from following SQLSKILLS) so I decided to write something that I used recently...
2015-05-22
163 reads
This is a technique that I am using from Paul Randal – concept of splitting CHECKDB: CHECKALLOC, CHECKCATALOG and CHECKTABLE – here...
2015-05-16
190 reads
I am an IT Professional from the UK with a huge interest in MS technology especially SQL Server and Azure. During...
2015-03-25
316 reads
If you like learning about internals use the undocumented function to get the FileID:PageID of your table rows and use...
2015-03-03
181 reads
Have you ever wanted to start a SQL trace (server-side trace!) from SQL agent and let it stop after X minutes...
2015-02-07
261 reads
2015-02-06
213 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