SQL Server – Script to Configure TempDB Files per Number of Logical Processors
In order to reduce Tempdb contention one of the best practices is to maintain multiple sized Tempdb data files, matching the...
2014-06-24
1,250 reads
In order to reduce Tempdb contention one of the best practices is to maintain multiple sized Tempdb data files, matching the...
2014-06-24
1,250 reads
SQL Server Datenbankbesitz: Umfrageergebnisse und Empfehlungen
(en)
You may remember the survey on database ownership which I launched several months ago.
In...
2014-06-27 (first published: 2014-06-23)
2,930 reads
Bad Meetings or Meeting Badly is the editorial of the day today. Looking at it today, I wish I had...
2014-06-23
520 reads
It’s Monday time for this week’s weekly link round-up. If you want to catch these links “live” (so exciting), follow...
2014-06-23
493 reads
Reading, Writing, and Riskmetic is another Question of the Day, this one about how to allow developers to understand performance...
2014-06-23
543 reads
Contained databases are the new feature in SQL Server 2012 and are defined on BOL (http://technet.microsoft.com/en-us/library/ff929071.aspx) as below :
A contained...
2014-06-23
9,307 reads
These are a couple of stored procedures I wrote to help me with security research. Each of the stored procedures...
2014-06-23
699 reads
In a previous post I wrote about Using a Hyper-V VHD in an Azure VM. Today I’d like to show...
2014-06-23
1,657 reads
(Be sure to checkout the FREE SQLpassion Performance Tuning Training Plan – you get a weekly email packed with all the...
2014-06-23
2,897 reads
Personal Thoughts
Just to be clear, I don't expect everyone to have my same thoughts. I personally fully support SQLServerCentral and...
2014-06-23
503 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